npm / sass
sass
What changed in sass 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
9 breaking7 deprecations17 new APIs and options10 behavior and defaults33 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsass 176 changes
Breaking changes 9
Escapes for zero, Unicode surrogates, or out-of-range code points are consistently normalized to U+FFFD in expression contexts; standalone
\0remains normalized to\0.CSS escapes in statement contexts that can contain interpolation are emitted as written rather than normalized.
Mixins and functions now throw an error when a rest parameter has the same name as a normal parameter.
Special values in colors now convert to 0 according to the CSS specification, which may affect compatibility.
Conversions now preserve analogous sets of missing color channels per the CSS spec, potentially changing conversion results.
Uses the 2.4 gamma transfer function for rec2020, matching the latest draft of CSS Color 4.
Legacy colors with non-integer channels now serialize channels as percentages in rgb() or rgba() functions to preserve browser compatibility and precision.
User-defined clamp functions are allowed and take precedence over the built-in function when unnamespaced.
Mixin rules whose names begin with -- now produce errors because browsers do not yet support CSS mixins.
Deprecations 7
Passing a version number beyond the current Dart Sass version is deprecated.
Passing a version number beyond the current Dart Sass version is deprecated.
Writing two compound selectors without whitespace, such as [class]a, is deprecated because it was always an error in CSS.
Certain user-defined names resembling CSS functions are deprecated because they conflict with special CSS function syntax.
Calls to functions whose names use the -progid suffix are deprecated.
Calls to hyphenated expression and URL functions are deprecated when their parsing behavior will change in a future release.
The old Sass if() syntax is deprecated in favor of the new CSS syntax.
New APIs and options 17
This field excludes deprecations from being considered fatal if they would have been enabled by
CompileRequest.fatal_deprecation.This property returns exactly the set of deprecations that will become fatal in Dart Sass 2.0.0.
The flag can exclude named deprecations from those selected by a version number.
The flag accepts
dart-sass-2to treat as fatal all deprecations that will become fatal in Dart Sass 2.0.0.The option accepts a
DeprecationSelectorDifferenceobject whoseexceptfield takes precedence overinclude.This property can be passed to
Options.fatalDeprecationsto mark as fatal exactly the deprecations that will become fatal in Dart Sass 2.0.0.Sass now supports first-class modules that can be accessed and passed to sass:meta functions.
Adds a mixin that includes CSS from a first-class module.
Adds a function for accessing first-class modules.
Existing sass:meta functions can receive first-class modules through a new
$moduleargument.Adds a JavaScript API class representing Sass modules.
Adds a Dart API class representing Sass modules.
Adds a JavaScript API method for asserting that a value is a Sass module.
Adds a Dart API method for asserting that a value is a Sass module.
Parent selectors are supported at the document root and emitted as-is in CSS output.
Adds a const default logger that writes to standard error or the browser console and automatically selects terminal colors.
Sass now supports the display-p3-linear color space for color values.
Behavior and default changes 10
Output files use compilation start time, ensuring watch and update modes recompile sources modified during compilation.
Negative zero is serialized as -0 instead of 0 in CSS calculations for greater compatibility.
User-defined calc functions are allowed and take precedence over the built-in function when unnamespaced.
User-defined functions with specified hyphenated suffixes are no longer forbidden.
Warnings and other messages now appear in color on the console when running in a browser.
Numbers with complex units are emitted to CSS as calc expressions, which support complex units in plain CSS.
attr() functions can now replace multiple arguments or syntax fragments in various CSS functions.
Plain-CSS if() functions can now be used as arguments to CSS color functions.
Plain-CSS if() functions can now replace multiple arguments or syntax fragments in various CSS functions.
Functions named with -- are parsed as unknown at-rules, and result is parsed as raw CSS to support plain CSS @function.
Fixes and other changes 33
Fixes a release-process issue that caused OS-specific embedded Sass packages to be missing their Dart Sass snapshots.
Undoes breaking changes from 1.106.0 in how escaped identifiers interact with sass:meta functions and named rest arguments.
Sass now properly reports the embedded protocol version as 3.4.0, which matters to consumers of the embedded protocol.
Serializing an attribute selector with an empty value no longer crashes.
Serializing a number with an empty unit no longer crashes; this case is possible through the JavaScript and Dart APIs or the embedded protocol.
Embedded Dart Sass more robustly converts invalid value errors into PARAMS errors.
Quotes are no longer incorrectly removed from attribute selector values containing backslashes.
Underscores written as CSS escapes are now properly normalized in variable, mixin, and function names.
CSS escapes at the beginning of identifiers no longer change parsing behavior compared with writing the character directly.
The parser no longer crashes when the first statement is indented and appears after the first line.
Crashes caused by errors or warnings in interpolations containing patterns like
// */are fixed.CSS escapes for E or e are no longer parsed as exponents in percentage selectors.
Units ambiguous with numeric exponents are serialized as escape codes so CSS does not interpret them as exponents.
Invalid source spans that could cause crashes on selector or media-query syntax errors containing escape sequences are fixed.
Fixes a deadlock when the async compiler fails to start.
Improves error messages for @extend rules across different media queries.
Reports a useful error instead of crashing when an invalid selector ends an indented syntax stylesheet.
Prevents loud comments before @use rules from being emitted multiple times.
Avoids recompiling output files inside the source directory, preventing an infinite recompilation loop.
Plain-CSS if() expression values are now emitted using CSS serialization rather than meta.inspect() formatting.
The Node package importer now resolves import-only Sass file variants declared in package.json exports, sass, and style fields when loaded via @import.
Deprecation warnings in browsers are now emitted as text instead of StringBuffer objects.
Fixes a crash when manually constructing a SassCalculation for calc with an argument that cannot be simplified.
Dependency loops in watch mode are now handled gracefully.
Fixes omitted outer style rules when nesting an at-rule within multiple style rules in plain CSS.
Additional fixes address implicit configuration when nested imports are involved.
Fixes CSS-style if() so values are not evaluated when their conditions do not match.
Fixes the span reported for standalone % expressions followed by whitespace.
Fixes a bug where a variable could be used before initialization during async compilation.
Now excludes obsolete deprecations from the returned set.
No longer emits warnings about deprecations that are obsolete when a version is specified.
Excludes obsolete deprecations when a Version is passed.
Fixed a performance regression introduced in Sass 1.92.0.