tailwindcss/packages
Robin Malfait 0c8d881f0e
Improve percentage canonicalization (#19072)
This PR improves the canonicalization of percentage values such that
`[.1]`, `[.10]`, `[10%]` and `[10.0%]` are all treated as the same
value.

Right now we're only focusing on percentages. We can likely do this for
all numbers, but I'm a little afraid of places where you can have
multiple numbers separated by multiple dots (think SVGs).

## Test plan

1. Added more tests to cover the new cases.
2. Tested it in a local test project, where you can see the
normalization in action.

<img width="1383" height="117" alt="image"
src="https://github.com/user-attachments/assets/03d99e3a-4404-437b-b458-58f7e8ce60da"
/>
2025-10-07 09:47:22 -04:00
..
@tailwindcss-browser Introduce canonicalizeCandidates on the internal Design System (#19059) 2025-10-07 12:41:12 +02:00
@tailwindcss-cli Prepare v4.1.14 release (#19037) 2025-10-01 11:48:02 -04:00
@tailwindcss-node Prepare v4.1.14 release (#19037) 2025-10-01 11:48:02 -04:00
@tailwindcss-postcss Prepare v4.1.14 release (#19037) 2025-10-01 11:48:02 -04:00
@tailwindcss-standalone Prepare v4.1.14 release (#19037) 2025-10-01 11:48:02 -04:00
@tailwindcss-upgrade Improve performance of cloning AST nodes (#19067) 2025-10-07 10:46:37 +00:00
@tailwindcss-vite Prepare v4.1.14 release (#19037) 2025-10-01 11:48:02 -04:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Improve percentage canonicalization (#19072) 2025-10-07 09:47:22 -04:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00