Dart Sass 1.40.0
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 asclamp()
and plain-CSSmin()
andmax()
). 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()
andmeta.calc-args()
can now inspect calculations.
-
Dart API
-
Add a new value type,
SassCalculation
, that represents calculations. -
Add new
CalculationOperation
,CalculationOperator
, andCalculationInterpolation
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.