sass 1.14.0

  • Installing
  • Versions
  • 76

A Dart implementation of Sass. Sass makes CSS fun again.

Sass logo npm statistics Pub version
Travis build status
Appveyor build status

Using Dart Sass

There are a few different ways to install and run Dart Sass, depending on your environment and your needs.

From Chocolatey (Windows)

If you use the Chocolatey package manager for Windows, you can install Dart Sass by running

choco install sass -prerelease

That'll give you a sass executable on your command line that will run Dart Sass.

From Homebrew (OS X)

If you use the Homebrew package manager for Mac OS X, you can install Dart Sass by running

brew install sass/sass/sass

That'll give you a sass executable on your command line that will run Dart Sass.


You can download the standalone Dart Sass archive for your operating system—containing the Dart VM and the snapshot of the Sass library—from the release page. Extract it, add the directory to your path, and the dart-sass executable is ready to run!

To add the directory to your path on Windows, open the Control Panel, then search for and select "edit environment variables". Find the variable named PATH, click Edit, add ;C:\path\to\dart-sass to the end of the value, then click OK.

On more Unix-y systems, edit your shell configuration file (usually ~/.bashrc or ~/.profile) and add at the end:

export PATH=$PATH:/path/to/dart-sass

Regardless of your OS, you'll need to restart your terminal in order for this configuration to take effect.

From npm

Dart Sass is available, compiled to JavaScript, as an npm package. You can install it globally using npm install -g sass which will provide access to the sass executable. You can also add it to your project using npm install --save-dev sass. This provides the executable as well as a library:

var sass = require('sass');

sass.render({file: scss_filename}, function(err, result) { /* ... */ });

// OR

var result = sass.renderSync({file: scss_filename});

See below for details on Dart Sass's JavaScript API.

From Pub

If you're a Dart user, you can install Dart Sass globally using pub global activate sass ^1.0.0-alpha, which will provide a dart-sass executable. You can also add it to your pubspec and use it as a library. We strongly recommend importing it with the prefix sass:

import 'package:sass/sass.dart' as sass;

void main(List<String> args) {

See the Dart API docs for details.

From Source

Assuming you've already checked out this repository:

  1. Install Dart. If you download an archive manually rather than using an installer, make sure the SDK's bin directory is on your PATH.

  2. In this repository, run pub get. This will install Dart Sass's dependencies.

  3. Run dart bin/sass.dart path/to/file.scss.

That's it!

JavaScript API

When installed via npm, Dart Sass supports a JavaScript API that aims to be compatible with Node Sass. Full compatibility is a work in progress, but Dart Sass currently supports the render() and renderSync() functions. Note however that by default, renderSync() is more than twice as fast as render(), due to the overhead of asynchronous callbacks.

To avoid this performance hit, render() can use the fibers package to call asynchronous importers from the synchronous code path. To enable this, pass the Fiber class to the fiber option:

var sass = require("sass");
var Fiber = require("fibers");

  file: "input.scss",
  importer: function(url, prev, done) {
    // ...
  fiber: Fiber
}, function(err, result) {
  // ...

Both render() and renderSync() support the following options:

No support is intended for the following options:

  • precision. Dart Sass defaults to a sufficiently high precision for all existing browsers, and making this customizable would make the code substantially less efficient.

  • sourceComments. Source maps are the recommended way of locating the origin of generated selectors.

Why Dart?

Dart Sass has replaced Ruby Sass as the canonical implementation of the Sass language. We chose Dart because it presented a number of advantages:

  • It's fast. The Dart VM is highly optimized, and getting faster all the time (for the latest performance numbers, see It's much faster than Ruby, and close to par with C++.

  • It's portable. The Dart VM has no external dependencies and can compile applications into standalone snapshot files, so we can distribute Dart Sass as only three files (the VM, the snapshot, and a wrapper script). Dart can also be compiled to JavaScript, which makes it easy to distribute Sass through npm, which the majority of our users use already.

  • It's easy to write. Dart is a higher-level language than C++, which means it doesn't require lots of hassle with memory management and build systems. It's also statically typed, which makes it easier to confidently make large refactors than with Ruby.

  • It's friendlier to contributors. Dart is substantially easier to learn than Ruby, and many Sass users in Google in particular are already familiar with it. More contributors translates to faster, more consistent development.

Compatibility Policy

For the most part, Dart Sass follows semantic versioning. We consider all of the following to be part of the versioned API:

  • The Sass language semantics implemented by Dart Sass.
  • The Dart API.
  • The JavaScript API.
  • The command-line interface.

Because Dart Sass has a single version that's shared across the Dart, JavaScript, and standalone distributions, this may mean that we increment the major version number when there are in fact no breaking changes for one or more distributions. However, we will attempt to limit the number of breaking changes we make and group them in as few releases as possible to minimize churn. We strongly encourage users to use the changelog for a full understanding of all the changes in each release.

There is one exception where breaking changes may be made outside of a major version revision. It is occasionally the case that CSS adds a feature that's incompatible with existing Sass syntax in some way. Because Sass is committed to full CSS compatibility, we occasionally need to break compatibility with old Sass code in order to remain compatible with CSS.

In these cases, we will first release a version of Sass that emits deprecation warnings for any stylesheets whose behavior will change. Then, at least three months after the release of a version with these deprecation warnings, we will release a minor version with the breaking change to the Sass language semantics.

Browser Compatibility

In general, we consider any change to Dart Sass's CSS output that would cause that CSS to stop working in a real browser to be a breaking change. However, there are some cases where such a change would have substantial benefits and would only negatively affect a small minority of rarely-used browsers. We don't want to have to block such a change on a major version release.

As such, if a change would break compatibility with less than 2% of the global market share of browser according to StatCounter GlobalStats, we may release a minor version of Dart Sass with that change.

Behavioral Differences from Ruby Sass

There are a few intentional behavioral differences between Dart Sass and Ruby Sass. These are generally places where Ruby Sass has an undesired behavior, and it's substantially easier to implement the correct behavior than it would be to implement compatible behavior. These should all have tracking bugs against Ruby Sass to update the reference behavior.

  1. @extend only accepts simple selectors, as does the second argument of selector-extend(). See issue 1599.

  2. Subject selectors are not supported. See issue 1126.

  3. Pseudo selector arguments are parsed as <declaration-value>s rather than having a more limited custom parsing. See issue 2120.

  4. The numeric precision is set to 10. See issue 1122.

  5. The indented syntax parser is more flexible: it doesn't require consistent indentation across the whole document. See issue 2176.

  6. Colors do not support channel-by-channel arithmetic. See issue 2144.

  7. Unitless numbers aren't == to unit numbers with the same value. In addition, map keys follow the same logic as ==-equality. See issue 1496.

  8. rgba() and hsla() alpha values with percentage units are interpreted as percentages. Other units are forbidden. See issue 1525.

  9. Too many variable arguments passed to a function is an error. See issue 1408.

  10. Allow @extend to reach outside a media query if there's an identical @extend defined outside that query. This isn't tracked explicitly, because it'll be irrelevant when issue 1050 is fixed.

  11. Some selector pseudos containing placeholder selectors will be compiled where they wouldn't be in Ruby Sass. This better matches the semantics of the selectors in question, and is more efficient. See issue 2228.

  12. The old-style :property value syntax is not supported in the indented syntax. See issue 2245.

  13. The reference combinator is not supported. See issue 303.

  14. Universal selector unification is symmetrical. See issue 2247.

  15. @extend doesn't produce an error if it matches but fails to unify. See issue 2250.

  16. Dart Sass currently only supports UTF-8 documents. We'd like to support more, but Dart currently doesn't support them. See dart-lang/sdk#11744, for example.

Disclaimer: this is not an official Google product.



In accordance with our compatibility policy, breaking changes made for CSS compatibility reasons are released as minor version revision after a three-month deprecation period.

  • Tokens such as #abcd that are now interpreted as hex colors with alpha channels, rather than unquoted ID strings.


Node JS

  • Tweak JS compilation options to substantially improve performance.


  • Properly generate source maps for stylesheets that emit @charset declarations.

Command-Line Interface

  • Don't error out when passing --embed-source-maps along with --embed-sources for stylesheets that contain non-ASCII characters.


  • Properly parse :nth-child() and :nth-last-child() selectors with whitespace around the argument.

  • Don't emit extra whitespace in the arguments for :nth-child() and :nth-last-child() selectors.

  • Fix support for CSS hacks in plain CSS mode.


  • Allow an IE-style single equals operator in plain CSS imports.


  • Allow @extend to be used with multiple comma-separated simple selectors. This is already supported by other implementations, but fell through the cracks for Dart Sass until now.

  • Don't crash when a media rule contains another media rule followed by a style rule.


Dart API

  • Add a SassException type that provides information about Sass compilation failures.


  • Remove the source map comment from the compiled JS. We don't ship with the source map, so this pointed to nothing.


  • Add support for importing plain CSS files. They can only be imported without an extension—for example, @import "style" will import style.css. Plain CSS files imported this way only support standard CSS features, not Sass extensions.

    See the proposal for details.

  • Add support for CSS's min() and max() math functions. A min() and max() call will continue to be parsed as a Sass function if it involves any Sass-specific features like variables or function calls, but if it's valid plain CSS (optionally with interpolation) it will be emitted as plain CSS instead.

    See the proposal for details.

  • Add support for range-format media features like (10px < width < 100px). See the proposal for details.

  • Normalize escape codes in identifiers so that, for example, éclair and \E9clair are parsed to the same value. See the proposal for details.

  • Don't choke on a byte-order mark at the beginning of a document when running in JavaScript.

Command-Line Interface

  • The --watch command now continues to recompile a file after a syntax error has been detected.

Dart API

  • Added a Syntax enum to indicate syntaxes for Sass source files.

  • The compile() and compileAsync() functions now parse files with the .css extension as plain CSS.

  • Added a syntax parameter to compileString() and compileStringAsync().

  • Deprecated the indented parameter to compileString() and compileStringAsync().

  • Added a syntax parameter to new ImporterResult() and a ImporterResult.syntax getter to set the syntax of the source file.

  • Deprecated the indented parameter to new ImporterResult() and the ImporterResult.indented getter in favor of syntax.


Command-Line Interface

  • Fix a Homebrew installation failure.


Command-Line Interface

  • Run the Chocolatey script with the correct arguments so it doesn't crash.


  • No user-visible changes.



  • Don't crash when passing both includePaths and importer.


  • When two @media rules' queries can't be merged, leave nested rules in place for browsers that support them.

  • Fix a typo in an error message.



  • Produce more readable filesystem errors, such as when a file doesn't exist.


Command-Line Interface

  • Don't emit ANSI codes to Windows terminals that don't support them.

  • Fix a bug where --watch crashed on Mac OS.


Node API

  • Add support for new sass.types.Color(argb) for creating colors from ARGB hex numbers. This was overlooked when initially adding support for Node Sass's JavaScript API.


Command-Line Interface

  • Add a --poll flag to make --watch mode repeatedly check the filesystem for updates rather than relying on native filesystem notifications.

  • Add a --stop-on-error flag to stop compiling additional files once an error is encountered.


  • No user-visible changes.


  • Add a deprecation warning for @-moz-document, except for cases where only an empty url-prefix() is used. Support is being removed from Firefox and will eventually be removed from Sass as well.
  • Fix a bug where @-moz-document functions with string arguments weren't being parsed.

Command-Line Interface

  • Don't crash when a syntax error is added to a watched file.


  • Fix crashes in released binaries.


  • Emit deprecation warnings for tokens such as #abcd that are ambiguous between ID strings and hex colors with alpha channels. These will be interpreted as colors in a release on or after 19 September 2018.

  • Parse unambiguous hex colors with alpha channels as colors.

  • Fix a bug where relative imports from files on the load path could look in the incorrect location.


Command-Line Interface

  • Fix a bug where the source map comment in the generated CSS could refer to the source map file using an incorrect URL.


  • No user-visible changes.


  • Produce better errors when expected tokens are missing before a closing brace.

  • Avoid crashing when compiling a non-partial stylesheet that exists on the filesystem next to a partial with the same name.

Command-Line Interface

  • Add support for the --watch, which watches for changes in Sass files on the filesystem and ensures that the compiled CSS is up-to-date.

  • When using --update, surface errors when an import doesn't exist even if the file containing the import hasn't been modified.

  • When compilation fails, delete the output file rather than leaving an outdated version.


  • Fix a bug where an absolute Windows path would be considered an input:output pair.

  • Forbid custom properties that have no values, like --foo:;, since they're forbidden by the CSS spec.


  • Fix a bug where an importer would be passed an incorrectly-resolved URL when handling a relative import.

  • Throw an error when an import is ambiguous due to a partial and a non-partial with the same name, or multiple files with different extensions. This matches the standard Sass behavior.

Command-Line Interface

  • Add an --interactive flag that supports interactively running Sass expressions (thanks to Jen Thakar!).


  • Improve the error message for invalid semicolons in the indented syntax.

  • Properly disallow semicolons after declarations in the indented syntax.

Command-Line Interface

  • Add support for compiling multiple files at once by writing sass input.scss:output.css. Note that unlike Ruby Sass, this always compiles files by default regardless of when they were modified.

    This syntax also supports compiling entire directories at once. For example, sass templates/stylesheets:public/css compiles all non-partial Sass files in templates/stylesheets to CSS files in public/css.

  • Add an --update flag that tells Sass to compile only stylesheets that have been (transitively) modified since the CSS file was generated.

Dart API

  • Add Importer.modificationTime() and AsyncImporter.modificationTime() which report the last time a stylesheet was modified.

Node API

  • Generate source maps when the sourceMaps option is set to a string and the outFile option is not set.


  • Add support for @elseif as an alias of @else if. This is not an intentional feature, so using it will cause a deprecation warning. It will be removed at some point in the future.


Node API

  • Fix loading imports relative to stylesheets that were themselves imported though relative include paths.


Command-Line Interface

  • Generate source map files by default when writing to disk. This can be disabled by passing --no-source-map.

  • Add a --source-map-urls option to control whether the source file URLs in the generated source map are relative or absolute.

  • Add an --embed-sources option to embed the contents of all source files in the generated source map.

  • Add an --embed-source-map option to embed the generated source map as a data: URL in the generated CSS.

Dart API

  • Add a sourceMap parameter to compile(), compileString(), compileAsync(), and compileStringAsync(). This takes a callback that's called with a SingleMapping that contains the source map information for the compiled CSS file.

Node API

  • Added support for the sourceMap, omitSourceMapUrl, outFile, sourceMapContents, sourceMapEmbed, and sourceMapRoot options to render() and renderSync().

  • Fix a bug where passing a relative path to render() or renderSync() would cause relative imports to break.

  • Fix a crash when printing warnings in stylesheets compiled using render() or renderSync().

  • Fix a bug where format errors were reported badly on Windows.


  • Always emit units in compressed mode for 0 dimensions other than lengths and angles.


  • The command-line executable will now create the directory for the resulting CSS if that directory doesn't exist.

  • Properly parse #{$var} -#{$var} as two separate values in a list rather than one value being subtracted from another.

  • Improve the error message for extending compound selectors.


  • Add a commit that was accidentally left out of 1.1.0.


  • The command-line executable can now be used to write an output file to disk using sass input.scss output.css.

  • Use a POSIX-shell-compatible means of finding the location of the sass shell script.


Initial stable release.

Changes Since 1.0.0-rc.1

  • Allow ! in custom property values (#260).

Dart API

  • Remove the deprecated render() function.

Node API

  • Errors are now subtypes of the Error type.

  • Allow both the data and file options to be passed to render() and renderSync() at once. The data option will be used as the contents of the stylesheet, and the file option will be used as the path for error reporting and relative imports. This matches Node Sass's behavior.


  • Add support for importing an _index.scss or _index.sass file when importing a directory.

  • Add a --load-path command-line option (alias -I) for passing additional paths to search for Sass files to import.

  • Add a --quiet command-line option (alias -q) for silencing warnings.

  • Add an --indented command-line option for using the indented syntax with a stylesheet from standard input.

  • Don't merge the media queries not type and (feature). We had previously been generating not type and (feature), but that's not actually the intersection of the two queries.

  • Don't crash on $x % 0.

  • The standalone executable distributed on GitHub is now named sass rather than dart-sass. The dart-sass executable will remain, with a deprecation message, until 1.0.0 is released.

Dart API

  • Add a Logger class that allows users to control how messages are printed by stylesheets.

  • Add a logger parameter to compile(), compileAsync(), compileString(), and compileStringAsync().


  • Import URLs passed to importers are no longer normalized. For example, if a stylesheet contains @import "./foo.scss", importers will now receive "./foo.scss" rather than "foo.scss".


  • Support hard tabs in the indented syntax.

  • Improve the formatting of comments that don't start on the same line as the opening /*.

  • Preserve whitespace after and in media queries in compressed mode.

Indented Syntax

  • Properly parse multi-line selectors.

  • Don't deadlock on /* comments.

  • Don't add an extra */ to comments that already have it.

  • Preserve empty lines in /* comments.


  • Fix a bug where some colors would crash compressed mode.


  • Add a compressed output style.

  • Emit a warning when && is used, since it's probably not what the user means.

  • round() now returns the correct results for negative numbers that should round down.

  • var() may now be passed in place of multiple arguments to rgb(), rgba(), hsl() and hsla().

  • Fix some cases where equivalent numbers wouldn't count as the same keys in maps.

  • Fix a bug where multiplication like (1/1px) * (1px/1) wouldn't properly cancel out units.

  • Fix a bug where dividing by a compatible unit would produce an invalid result.

  • Remove a non-sh-compatible idiom from the standalone shell script.

Dart API

  • Add a functions parameter to compile(), compleString(), compileAsync(), and compileStringAsync(). This allows users to define custom functions in Dart that can be invoked from Sass stylesheets.

  • Expose the Callable and AsyncCallable types, which represent functions that can be invoked from Sass.

  • Expose the Value type and its subclasses, as well as the top-level sassTrue, sassFalse, and sassNull values, which represent Sass values that may be passed into or returned from custom functions.

  • Expose the OutputStyle enum, and add a style parameter to compile(), compleString(), compileAsync(), and compileStringAsync() that allows users to control the output style.


  • Support the functions option.

  • Support the "compressed" value for the outputStyle option.


  • Support unquoted imports in the indented syntax.

  • Fix a crash when :not(...) extends a selector that appears in :not(:not(...)).


  • Add support for asynchronous importers to render() and renderSync().

Dart API

  • Add compileAsync() and compileStringAsync() methods. These run asynchronously, which allows them to take asynchronous importers (see below).

  • Add an AsyncImporter class. This allows imports to be resolved asynchronously in case no synchronous APIs are available. AsyncImporters are only compatible with compileAysnc() and compileStringAsync().


  • Properly parse numbers with exponents.

  • Don't crash when evaluating CSS variables whose names are entirely interpolated (for example, #{--foo}: ...).


  • Add support for the importer option to render() and renderSync(). Only synchronous importers are currently supported.

Dart API

  • Added an Importer class. This can be extended by users to provide support for custom resolution for @import rules.

  • Added built-in FilesystemImporter and PackageImporter implementations that support resolving file: and package: URLs, respectively.

  • Added an importers argument to the compile() and compileString() functions that provides Importers to use when resolving @import rules.

  • Added a loadPaths argument to the compile() and compileString() functions that provides paths to search for stylesheets when resolving @import rules. This is a shorthand for passing FilesystemImporters to the importers argument.


  • Add support for the ::slotted() pseudo-element.

  • Generated transparent colors will now be emitted as rgba(0, 0, 0, 0) rather than transparent. This works around a bug wherein IE incorrectly handles the latter format.

Command-Line Interface

  • Improve the logic for whether to use terminal colors by default.


  • Add support for data, includePaths, indentedSyntax, lineFeed, indentWidth, and indentType options to render() and renderSync().

  • The result object returned by render() and renderSync() now includes the stats object which provides metadata about the compilation process.

  • The error object thrown by render() and renderSync() now includes line, column, file, status, and formatted fields. The message field and toString() also provide more information.

Dart API

  • Add a renderString() method for rendering Sass source that's not in a file on disk.


  • Drop support for the reference combinator. This has been removed from the spec, and will be deprecated and eventually removed in other implementations.

  • Trust type annotations when compiling to JavaScript, which makes it substantially faster.

  • Compile to minified JavaScript, which decreases the code size substantially and makes startup a little faster.

  • Fix a crash when inspecting a string expression that ended in "\a".

  • Fix a bug where declarations and @extend were allowed outside of a style rule in certain circumstances.

  • Fix not in parentheses in @supports conditions.

  • Allow url as an identifier name.

  • Properly parse /***/ in selectors.

  • Properly parse unary operators immediately after commas.

  • Match Ruby Sass's rounding behavior for all functions.

  • Allow \ at the beginning of a selector in the indented syntax.

  • Fix a number of @extend bugs:

    • selector-extend() and selector-replace() now allow compound selector extendees.

    • Remove the universal selector * when unifying with other selectors.

    • Properly unify the result of multiple simple selectors in the same compound selector being extended.

    • Properly handle extensions being extended.

    • Properly follow the first law of @extend.

    • Fix selector specificity tracking to follow the second law of @extend.

    • Allow extensions that match selectors but fail to unify.

    • Partially-extended selectors are no longer used as parent selectors.

    • Fix an edge case where both the extender and the extended selector have invalid combinator sequences.

    • Don't crash with a "Bad state: no element" error in certain edge cases.


  • Elements without a namespace (such as div) are no longer unified with elements with the empty namespace (such as |div). This unification didn't match the results returned by is-superselector(), and was not guaranteed to be valid.

  • Support & within @at-root.

  • Properly error when a compound selector is followed immediately by &.

  • Properly handle variable scoping in @at-root and nested properties.

  • Properly handle placeholder selectors in selector pseudos.

  • Properly short-circuit the or and and operators.

  • Support --$variable.

  • Don't consider unitless numbers equal to numbers with units.

  • Warn about using named colors in interpolation.

  • Don't emit loud comments in functions.

  • Detect import loops.

  • Fix @import with a supports() clause.

  • Forbid functions named "and", "or", and "not".

  • Fix type-of() with a function.

  • Emit a nicer error for invalid tokens in a selector.

  • Fix invert() with a $weight parameter.

  • Fix a unit-parsing edge-cases.

  • Always parse imports with queries as plain CSS imports.

  • Support & followed by a non-identifier.

  • Properly handle split media queries.

  • Properly handle a placeholder selector that isn't at the beginning of a compound selector.

  • Fix more str-slice() bugs.

  • Fix the % operator.

  • Allow whitespace between = and the mixin name in the indented syntax.

  • Fix some slash division edge cases.

  • Fix not when used like a function.

  • Fix attribute selectors with single-character values.

  • Fix some bugs with the call() function.

  • Properly handle a backslash followed by a CRLF sequence in a quoted string.

  • Fix numbers divided by colors.

  • Support slash-separated numbers in arguments to plain CSS functions.

  • Error out if a function is passed an unknown named parameter.

  • Improve the speed of loading large files on Node.

  • Don't consider browser-prefixed selector pseudos to be superselectors of differently- or non-prefixed selector pseudos with the same base name.

  • Fix an @extend edge case involving multiple combinators in a row.

  • Fix a bug where a @content block could get incorrectly passed to a mixin.

  • Properly isolate the lexical environments of different calls to the same mixin and function.


  • Add the content-exists() function.

  • Support interpolation in loud comments.

  • Fix a bug where even valid semicolons and exclamation marks in custom property values were disallowed.

  • Disallow invalid function names.

  • Disallow extending across media queries.

  • Properly parse whitespace after ... in argument declaration lists.

  • Support terse mixin syntax in the indented syntax.

  • Fix @at-root query parsing.

  • Support special functions in @-moz-document.

  • Support ... after a digit.

  • Fix some bugs when treating a map as a list of pairs.


  • Fix function-exists(), variable-exists(), and mixin-exists() to use the lexical scope rather than always using the global scope.

  • str-index() now correctly inserts at negative indices.

  • Properly parse url()s that contain comment-like text.

  • Fix a few more small @extend bugs.

  • Fix a bug where interpolation in a quoted string was being dropped in some circumstances.

  • Properly handle @for rules where each bound has a different unit.

  • Forbid mixins and functions from being defined in control directives.

  • Fix a superselector-computation edge case involving :not().

  • Gracefully handle input files that are invalid UTF-8.

  • Print a Sass stack trace when a file fails to load.


  • Allow var() to be passed to rgb(), rgba(), hsl(), and hsla().

  • Fix conversions between numbers with dpi, dpcm, and dppx units. Previously these conversions were inverted.

  • Don't crash when calling str-slice() with an $end-at index lower than the $start-at index.

  • str-slice() now correctly returns "" when $end-at is negative and points before the beginning of the string.

  • Interpolation in quoted strings now properly preserves newlines.

  • Don't crash when passing only $hue or no keyword arguments to adjust-color(), scale-color(), or change-color().

  • Preserve escapes in identifiers. This used to only work for identifiers in SassScript.

  • Fix a few small @extend bugs.


  • Fix bounds-checking for opacify(), fade-in(), transparentize(), and fade-out().

  • Fix a bug with @extend superselector calculations.

  • Fix some cases where #{...}-- would fail to parse in selectors.

  • Allow a single number to be passed to saturate() for use in filter contexts.

  • Fix a bug where **/ would fail to close a loud comment.

  • Fix a bug where mixin and function calls could set variables incorrectly.

  • Move plain CSS @imports to the top of the document.


  • Add support for bracketed lists.

  • Add support for Unicode ranges.

  • Add support for the Microsoft-style = operator.

  • Print the filename for @debug rules.

  • Fix a bug where 1 + - 2 and similar constructs would crash the parser.

  • Fix a bug where @extend produced the wrong result when used with selector combinators.

  • Fix a bug where placeholder selectors were not allowed to be unified.

  • Fix the mixin-exists() function.

  • Fix :nth-child() and :nth-last-child() parsing when they contain of selector.


  • Fix a bug where color equality didn't take the alpha channel into account.

  • Fix a bug with converting some RGB colors to HSL.

  • Fix a parent selector resolution bug.

  • Properly declare the arguments for opacify() and related functions.

  • Add a missing dependency on the stack_trace package.

  • Fix broken Windows archives.

  • Emit colors using their original representation if possible.

  • Emit colors without an original representation as names if possible.


  • Fix a bug where variables, functions, and mixins were broken in imported files.


  • Initial alpha release.

Use this package as an executable

1. Install it

You can install the package from the command line:

$ pub global activate sass

2. Use it

The package has the following executables:

$ dart-sass

Use this package as a library

1. Depend on it

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

  sass: ^1.14.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

import 'package:sass/sass.dart';
Version Uploaded Documentation Archive
1.15.2 Dec 6, 2018 Go to the documentation of sass 1.15.2 Download sass 1.15.2 archive
1.15.1 Nov 16, 2018 Go to the documentation of sass 1.15.1 Download sass 1.15.1 archive
1.15.0 Nov 14, 2018 Go to the documentation of sass 1.15.0 Download sass 1.15.0 archive
1.14.3 Oct 18, 2018 Go to the documentation of sass 1.14.3 Download sass 1.14.3 archive
1.14.2 Oct 11, 2018 Go to the documentation of sass 1.14.2 Download sass 1.14.2 archive
1.14.1 Sep 27, 2018 Go to the documentation of sass 1.14.1 Download sass 1.14.1 archive
1.14.0 Sep 19, 2018 Go to the documentation of sass 1.14.0 Download sass 1.14.0 archive
1.13.4 Sep 11, 2018 Go to the documentation of sass 1.13.4 Download sass 1.13.4 archive
1.13.3 Sep 11, 2018 Go to the documentation of sass 1.13.3 Download sass 1.13.3 archive
1.13.2 Sep 5, 2018 Go to the documentation of sass 1.13.2 Download sass 1.13.2 archive

All 84 versions...

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

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

  • Dart: 2.1.0
  • pana: 0.12.7


Detected platforms: Flutter, other

Primary library: package:sass/sass.dart with components: io, isolate.

Health suggestions

Fix lib/src/io/node.dart. (-6.78 points)

Analysis of lib/src/io/node.dart reported 14 hints, including:

line 16 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 27 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 34 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 39 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 44 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

Fix lib/src/node/utils.dart. (-2.96 points)

Analysis of lib/src/node/utils.dart reported 6 hints, including:

line 36 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 51 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 74 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 77 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 80 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

Fix lib/src/node/chokidar.dart. (-1.99 points)

Analysis of lib/src/node/chokidar.dart reported 4 hints:

line 7 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 10 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 15 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

line 24 col 1: The @JS() annotation can only be used if it is also declared on the library directive.

Fix additional 16 files with analysis or formatting issues. (-10 points)

Additional issues in the following files:

  • lib/src/importer/result.dart (2 hints)
  • lib/src/node/exports.dart (2 hints)
  • lib/src/node/fiber.dart (2 hints)
  • lib/src/node/render_result.dart (2 hints)
  • lib/src/node/error.dart (1 hint)
  • lib/src/node/function.dart (1 hint)
  • lib/src/node/importer_result.dart (1 hint)
  • lib/src/node/render_context.dart (1 hint)
  • lib/src/node/render_context_options.dart (1 hint)
  • lib/src/node/render_options.dart (1 hint)
  • lib/src/node/types.dart (1 hint)
  • lib/src/node/value/color.dart (1 hint)
  • lib/src/node/value/list.dart (1 hint)
  • lib/src/node/value/map.dart (1 hint)
  • lib/src/node/value/number.dart (1 hint)
  • lib/src/node/value/string.dart (1 hint)

Maintenance suggestions

The description is too short. (-20 points)

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

Maintain an example. (-10 points)

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.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.25.0-dev.64.0 <3.0.0
args >=1.4.0 <2.0.0 1.5.1
async >=1.10.0 <3.0.0 2.0.8
charcode ^1.1.0 1.1.2
cli_repl >=0.1.3 <0.3.0 0.2.0+1
collection ^1.8.0 1.14.11
convert ^2.0.1 2.0.2
meta ^1.1.0 1.1.6
package_resolver ^1.0.0 1.0.6
path ^1.6.0 1.6.2
source_maps ^0.10.5 0.10.8
source_span ^1.4.0 1.4.1
stack_trace >=0.9.0 <2.0.0 1.9.3
stream_transform ^0.0.1 0.0.14+1
string_scanner >=0.1.5 <2.0.0 1.0.4
tuple ^1.0.0 1.0.2
watcher ^0.9.6 0.9.7+10
Transitive dependencies
http_parser 3.1.3
matcher 0.12.4
package_config 1.0.5
quiver 2.0.1
typed_data 1.1.6
Dev dependencies
analyzer >=0.30.0 <0.33.0
archive >=1.0.0 <3.0.0
crypto >=0.9.2 <3.0.0
dart_style ^1.0.0
grinder ^0.8.0
http ^0.11.0 0.12.0
js ^0.6.0 0.6.1+1
node_preamble ^1.1.0
pub_semver ^1.0.0
stream_channel ^1.0.0
test >=0.12.42 <2.0.0
test_descriptor ^1.1.0
test_process ^1.0.0-rc.1
xml >=2.4.0 <4.0.0
yaml ^2.0.0