## Summary `compareBreakpoints` compared values in the same unit with `parseInt`, which drops the fractional part, so `40.25rem` and `40.5rem` were treated as equal. As a result `min-[40.5rem]:*` could be emitted before `min-[40.25rem]:*` (the same happened for `@min-*` container queries), which means the smaller breakpoint wins in the cascade. This switches the comparison to `parseFloat` so decimal values are ordered numerically; values that were already sorted correctly are unaffected. ## Test plan - Added a test to `packages/tailwindcss/src/variants.test.ts` that sorts `min-[40.25rem]`, `min-[40.5rem]`, `max-[40.25rem]` and `max-[40.5rem]`. It fails without the change (the `min-[40.5rem]` rule is emitted before `min-[40.25rem]`) and passes with it. - `vitest run src/variants.test.ts -t "decimal values"` (in `packages/tailwindcss`) - `vitest run` (in `packages/tailwindcss`): 42 files, 5009 tests passed - `prettier --check` on the changed files |
||
|---|---|---|
| .. | ||
| @tailwindcss-browser | ||
| @tailwindcss-cli | ||
| @tailwindcss-node | ||
| @tailwindcss-postcss | ||
| @tailwindcss-standalone | ||
| @tailwindcss-turbopack | ||
| @tailwindcss-upgrade | ||
| @tailwindcss-vite | ||
| @tailwindcss-webpack | ||
| internal-example-plugin | ||
| tailwindcss | ||
| tsconfig.base.json | ||