No description
## 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 |
||
|---|---|---|
| .github | ||
| crates | ||
| integrations | ||
| packages | ||
| patches | ||
| playgrounds | ||
| scripts | ||
| .gitignore | ||
| .prettierignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| rust-toolchain.toml | ||
| turbo.json | ||
| vitest.config.mts | ||
A utility-first CSS framework for rapidly building custom user interfaces.
Documentation
For full documentation, visit tailwindcss.com.
Community
For help, discussion about best practices, or feature ideas:
Discuss Tailwind CSS on GitHub
Contributing
If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.