Repository navigation
What's Changed
Bug Fixes
- transform a division or unit conversion only when the result is exact at the
configuredprecision. For example.,calc(100% / 3)stayscalc(100% / 3)instead of
becomingcalc(33.33333%), andcalc(1cm + 1px)
is no longer converted to1.02646cm.
Useprecision: falseto transform every division. - keep
precisionsignificant digits for values below 1, so
calc(1px / 150000)is no longer rounded to.00001px min(),max()andclamp()preserve the original unit- keep the order of terms and factors around
var(),env(),attr()and
other substitution functions. For example, with--a: 1px + 2px,var(--a) * 2means
1px + 2px * 2, so reordering the multiplication would be a bug.
var(--a) * 2is not rewritten to2 * var(--a),var(--a) / var(--a)is
not cancelled, and parentheses are kept (1px - (2 * var(--a))).
Unrecognised functions such asanchor-size()are treated the same way, so
in2 * anchor-size(width) * .5, is no longer transformed toanchor-size(width) - keep the parentheses of a nested
calc()that contains unresolved values, so
calc(var(--a) - calc(var(--b) - var(--c)))is no longer rewritten to
calc(var(--a) - var(--b) + var(--c)) - do not flip every sign of a parenthesized sum that starts with a negative
term:calc((var(--b) - 7 - 2))is nowcalc(-9 + var(--b))instead of
calc(-1 * (9 - var(--b))), which changed the value when--bexpands to
several tokens
Full Changelog: v11.2.1...v11.2.2