Changes to CSS Calc
May 13, 2026 ยท View on GitHub
3.2.1
May 13, 2026
- Update
round(line-width, 1.2345px)to match the latest spec
3.2.0
April 12, 2026
- Add support for
round(line-width, 1.2345px) - Add
devicePixelLengthoption
3.1.1
February 13, 2026
- Fix missing whitespace between components after solving calc expressions (e.g.
calc(10px)calc(20px)now serializes as10px 20px)
3.1.0
February 12, 2026
- Add
onParseErroroption tocalc().
3.0.1
February 10, 2026
- Fix source positions for generated functions and comma's. These now adopt the source position of surrounding nodes.
3.0.0
January 14, 2026
- Updated: Support for Node
20.19.0or later (major). - Removed:
commonjsAPI. In supported Node versionsrequire(esm)will work without needing to make code changes. - Updated
@csstools/css-tokenizerto4.0.0(major) - Updated
@csstools/css-parser-algorithmsto4.0.0(major)
2.1.4
May 27, 2025
- Updated
@csstools/css-tokenizerto3.0.4(patch) - Updated
@csstools/css-parser-algorithmsto3.0.5(patch)
2.1.3
April 19, 2025
- Update
random()to better handle floating point errors. - Update
random()to match the latest specification
2.1.2
February 23, 2025
- Update
random()to correctly handle extremely large ranges or extremely tiny steps.
2.1.1
December 27, 2024
- Apply
toCanonicalUnitsto result containingNaNandInfinity
2.1.0
November 11, 2024
- Add support for
random()
2.0.4
November 1, 2024
- Updated
@csstools/css-tokenizerto3.0.3(patch) - Updated
@csstools/css-parser-algorithmsto3.0.4(patch)
2.0.3
October 23, 2024
- Updated
@csstools/css-parser-algorithmsto3.0.3(patch)
2.0.2
October 10, 2024
- Updated
@csstools/css-tokenizerto3.0.2(patch) - Updated
@csstools/css-parser-algorithmsto3.0.2(patch)
2.0.1
August 18, 2024
- Add
rawPercentagesoption to indicate that percentage values do not resolve against external values. - Skip some calculations for values with percentages as those only have a known positive or negative value in a browser context.
- Updated
@csstools/css-tokenizerto3.0.1(patch) - Updated
@csstools/css-parser-algorithmsto3.0.1(patch)
2.0.0
August 3, 2024
- Updated: Support for Node v18+ (major).
- Updated
@csstools/css-tokenizerto3.0.0(major) - Updated
@csstools/css-parser-algorithmsto3.0.0(major)
1.2.4
July 6, 2024
- Updated
@csstools/css-tokenizerto2.4.1(patch) - Updated
@csstools/css-parser-algorithmsto2.7.1(patch)
1.2.3
June 29, 2024
- Updated
@csstools/css-tokenizerto2.3.2(patch) - Updated
@csstools/css-parser-algorithmsto2.7.0(minor)
1.2.2
May 4, 2024
- Updated
@csstools/css-tokenizerto2.3.1(patch) - Updated
@csstools/css-parser-algorithmsto2.6.3(patch)
1.2.1
May 4, 2024
- Allow uncapped precision in
calc()serialization - Add
censorIntoStandardRepresentableValuesconversion option - Updated
@csstools/css-tokenizerto2.3.0(minor) - Updated
@csstools/css-parser-algorithmsto2.6.2(patch)
1.2.0
March 13, 2024
- Correctly serialize negative zero
-0values - Add support for
round()with only a single number argument - Add support for
noneinclamp() - Updated
@csstools/css-tokenizerto2.2.4(patch) - Updated
@csstools/css-parser-algorithmsto2.6.1(patch)
1.1.7
February 19, 2024
- Updated
@csstools/css-parser-algorithmsto2.6.0(minor)
1.1.6
December 31, 2023
- Updated
@csstools/css-tokenizerto2.2.3(patch) - Updated
@csstools/css-parser-algorithmsto2.5.0(minor)
1.1.5
December 15, 2023
- Fix type definitions
- Updated
@csstools/css-tokenizerto2.2.2(patch) - Updated
@csstools/css-parser-algorithmsto2.4.0(minor)
1.1.4
September 24, 2023
- Updated
@csstools/css-tokenizerto2.2.1(patch) - Updated
@csstools/css-parser-algorithmsto2.3.2(patch)
1.1.3
July 24, 2023
- Correctly serialize negative zero
-0values ascalc(-1 * 0px) - Updated
@csstools/css-tokenizerto2.2.0(minor) - Updated
@csstools/css-parser-algorithmsto2.3.1(patch)
1.1.2
July 3, 2023
- Updated
@csstools/css-parser-algorithmsto2.3.0(minor)
1.1.1
April 10, 2023
- Updated
@csstools/css-tokenizerto2.1.1(patch) - Updated
@csstools/css-parser-algorithmsto2.1.1(patch)
1.1.0
April 10, 2023
- Expose the list of supported math functions.
1.0.1
March 25, 2023
- Improve case insensitive string matching.
1.0.0
February 21, 2023
- Initial version