github sass/dart-sass 1.40.0
Dart Sass 1.40.0

latest releases: 1.75.0, 1.74.1, sass_api/10.1.1...
2 years ago

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.

Don't miss a new dart-sass release

NewReleases is sending notifications on new releases.