A utility-first CSS framework for rapid UI development.
Canonicalize `calc(var(--spacing)*…)` expressions into `--spacing(…)` (#19769)
This PR canonicalizes usages of `calc(var(--spacing)*…)` to `--spacing(…)` when used in arbitrary values. Some examples: | Before | After | | --- | --- | | `pt-[min(20%,calc(var(--spacing)*8))]` | `pt-[min(20%,--spacing(8))]` | | `pt-[min(20%,calc(var(--spacing)*var(--other)))]` | `pt-[min(20%,--spacing(var(--other)))]` | | `pt-[calc(var(--spacing)*8)]` | `pt-8` | | `pt-[calc(var(--spacing)*var(--other))]` | `pt-[--spacing(var(--other))]` | | `[padding-top:min(20%,calc(var(--spacing)*8))]` | `pt-[min(20%,--spacing(8))]` | | `[padding-top:min(20%,calc(var(--spacing)*var(--other)))]` | `pt-[min(20%,--spacing(var(--other)))]` | | `[padding-top:calc(var(--spacing)*8)]` | `pt-8` | | `[padding-top:calc(var(--spacing)*var(--other))]` | `pt-[--spacing(var(--other))]` | ## Test plan 1. Existing tests pass 2. Added new tests
R
Robin Malfait committed
c586bd6a94a5415e7154474980d1c664e28b6991
Parent: bf2e2fe
Committed by GitHub <noreply@github.com>
on 3/8/2026, 7:19:35 PM