Skip to content

Dart Sass 1.40.0

Compare
Choose a tag to compare
@sassbot sassbot released this 13 Sep 23:54
· 736 commits to main since this release
bb08672

To install Sass 1.40.0, download one of the packages below and add it to your PATH, or see the Sass website for full installation instructions.

Changes

  • Add support for first-class calc() expressions (as well as clamp() and plain-CSS min() and max()). This means:

    • calc() expressions will be parsed more thoroughly, and errors will be highlighted where they weren't before. This may break your stylesheets, but only if they were already producing broken CSS.

    • calc() expressions will be simplified where possible, and may even return numbers if they can be simplified away entirely.

    • calc() expressions that can't be simplified to numbers return a new data type known as "calculations".

    • Sass variables and functions can now be used in calc() expressions.

    • New functions meta.calc-name() and meta.calc-args() can now inspect calculations.

Dart API

  • Add a new value type, SassCalculation, that represents calculations.

  • Add new CalculationOperation, CalculationOperator, and CalculationInterpolation types to represent types of arguments that may exist as part of a calculation.

  • Add a new Value.assertCalculation() method.

  • Add a new Number.hasCompatibleUnits() method.

See the full changelog for changes in earlier releases.