This PR adds support for canonicalization of utilities that accept bare values and exceed the default spacing scale we use for intellisense. Right now, all utilities are behind functions, so the only way to know whether something compiles is by compiling a candidate, e.g. `w-8` and passing it to the utility functions. To help us, we use the intellisense APIs that we use for suggestions. Most utilities that accept bare values, have suggestions up until `*-96`, so `w-96 h-96` would be canonicalized to `size-96`. But the moment we exceed that, the result stays as-is. ``` → w-96 h-96 = size-96 → w-1234 h-1234 = h-1234 w-1234 ``` This PR ensures that the last scenario also gets canonicalized to `size-1234` instead of staying as `h-1234 w-1234`. ``` → w-96 h-96 = size-96 → w-1234 h-1234 = size-1234 ``` ## Test plan 1. Existing tests pass 2. Added new tests for utilities with bare values [ci-all] just to see if this additional logic doesn't cause timeouts in CI for WIndows. In my testing this doesn't have a significant impact on performance at all. |
||
|---|---|---|
| .. | ||
| @tailwindcss-browser | ||
| @tailwindcss-cli | ||
| @tailwindcss-node | ||
| @tailwindcss-postcss | ||
| @tailwindcss-standalone | ||
| @tailwindcss-upgrade | ||
| @tailwindcss-vite | ||
| @tailwindcss-webpack | ||
| internal-example-plugin | ||
| tailwindcss | ||
| tsconfig.base.json | ||