This PR fixes a bug where we suggest a canonicalization with a high precision number. E.g.: `w-[calc(100%/3.5)]` → `w-[28.571428571428573%]` While this is technically correct, it's also not as user friendly. This PR solves this issue by checking whether the result has a precision of `.xx` at most. If that's not the case, then we keep the original expression. Fixes: https://github.com/tailwindlabs/tailwindcss-intellisense/issues/1591 ## Test plan 1. Added an a regression test for this situation 2. Existing tests pass |
||
|---|---|---|
| .. | ||
| @tailwindcss-browser | ||
| @tailwindcss-cli | ||
| @tailwindcss-node | ||
| @tailwindcss-postcss | ||
| @tailwindcss-standalone | ||
| @tailwindcss-upgrade | ||
| @tailwindcss-vite | ||
| @tailwindcss-webpack | ||
| internal-example-plugin | ||
| tailwindcss | ||
| tsconfig.base.json | ||