sass_var_transformer 0.3.0

  • Installing
  • Versions
  • 18

SASS Var Transformer

Replaces vars in SCSS files with package path and compiles it to .css files

It depends on dart-sass, so there is no need to have Sass installed.


Add the following lines to your pubspec.yaml:

  # Only for demonstration!!!!
  mdl: ^1.18.0

  # This is important
  sass_var_transformer: any
  - di
  # And this
  - sass_var_transformer:
      # Converts @mdl to ../.pub-cache/hosted/
      mdl: package:mdl

Assume you have web/material.scss:

@import "@mdl/assets/themes/deep_purple-pink/material-design-lite";

Add this line to your index.html:

    <link rel="stylesheet" href="material.css">

If you run pub serve:

  • The Transformer reads the SCSS-File

  • @mdl will be replaced with the path to your local mdl-package
    e.g. @import "<your user>/.pub-cache/hosted/<version from pubspec>/lib/assets/themes/deep_purple-pink/material-design-lite";

  • SCSS-File will be compiled to .CSS

Check out this sample: GH MDL Text-Only
The sample uses a mixture between Global-Package-Style and Styles for local components!


Copyright 2017 Michael Mitterer (,
IT-Consulting and Development Limited, Austrian Branch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
either express or implied. See the License for the specific language
governing permissions and limitations under the License.

If this plugin is helpful for you - please (Circle) me or star this repo here on GitHub

Change Log for sass_var_transformer

Transformer that changes vars in SASS-Files

v0.3.0 - 2017-02-28


  • String-Rendering-Function added ac71d9b

v0.2.0 - 2017-02-28


  • Works also with local packages and package internal styles 5e46329

This was generated with Changelog for Dart

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  sass_var_transformer: "^0.3.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:sass_var_transformer/sass_var_transformer.dart';
Version Uploaded Documentation Archive
0.3.0 Feb 28, 2017 Go to the documentation of sass_var_transformer 0.3.0 Download sass_var_transformer 0.3.0 archive
0.2.0 Feb 28, 2017 Go to the documentation of sass_var_transformer 0.2.0 Download sass_var_transformer 0.2.0 archive
0.1.0 Feb 28, 2017 Go to the documentation of sass_var_transformer 0.1.0 Download sass_var_transformer 0.1.0 archive


We analyzed this package on Jul 17, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
33 / 100
Reflects how tidy and up-to-date the package is. [more]
42 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: unsure

Error(s) prevent platform classification:

Error(s) in lib/renderer.dart: Target of URI doesn't exist: 'package:sass/src/visitor/perform.dart'.


  • Fix platform conflicts.

    Error(s) prevent platform classification:

    Error(s) in lib/renderer.dart: Target of URI doesn't exist: 'package:sass/src/visitor/perform.dart'.

  • Running dartdoc failed.

    Make sure dartdoc runs without any issues.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 8 errors 10 hints.

    Make sure that the imported libraries are not in conflict. Error(s) in lib/sass_var_transformer.dart: Target of URI doesn't exist: 'package:sass/src/visitor/perform.dart'.

    Make sure that the imported libraries are not in conflict. Error(s) in lib/renderer.dart: Target of URI doesn't exist: 'package:sass/src/visitor/perform.dart'.

  • Package is getting outdated.

    The package was released 71 weeks ago.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use sass_var_transformer.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <2.0.0
barback ^0.15.2 0.15.2+16
package_resolver ^1.0.0 1.0.3
packages ^0.1.0 0.1.9 0.4.1
sass ^1.0.0-alpha 1.1.1 1.9.2
Transitive dependencies
args 0.13.7 1.4.3
async 2.0.7
browser 0.10.0+3
charcode 1.1.2
collection 1.14.10
console_log_handler 0.2.3 1.0.8
convert 2.0.1
http 0.11.3+17
http_parser 3.1.2
intl 0.15.6
logging 0.11.3+1
logging_handlers 0.8.0
meta 1.1.5
package_config 1.0.3
path 1.6.1
pool 1.3.5
quiver_hashcode 1.0.0
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
tuple 1.0.1
typed_data 1.1.5