No description
This PR fixes an issue where custom variants with just `-` in the name were allowed but weren't actually picked up by Oxide so you couldn't use them anyway. The reason we allow `-` is for `kebab-style-variants`, which is very common, but you shouldn't use `-`, `--` or more in a variant name. It doesn't really solve the issue (#18863), but it fixes the inconsistencies in that exist today. Inconsistencies: | | `-:flex` | `--:flex` | | --: | :--: | :--: | | Oxide | ❌ | ❌ | | Tailwind Play | ✅ | ❌ | | Intellisense | ✅ | ✅ | - Oxide already had the correct rules setup, so this is expected - Tailwind Play uses Tailwind's core compile step, but it considers candidates that start with `--` as a CSS variable instead of a utility. This means that the `--:flex` was considered a CSS variable and skipped during compilation. - Intellisense uses the same APIs than Tailwind's core, but it didn't have the CSS variable check which resulted in the `--:flex` being "correct". With this PR, the matrix looks like this now: | | `-:flex` | `--:flex` | | --: | :--: | :--: | | Oxide | ❌ | ❌ | | Tailwind Play | ❌ | ❌ | | Intellisense | ❌ | ❌ | This should not be considered a breaking change because Oxide didn't pick up candidates with variants that start with a `-`. CSS for these candidates was never generated before. Closes: #18863 --------- Co-authored-by: Jordan Pittman <thecrypticace@gmail.com> |
||
|---|---|---|
| .github | ||
| crates | ||
| integrations | ||
| packages | ||
| patches | ||
| playgrounds | ||
| scripts | ||
| .gitignore | ||
| .npmrc | ||
| .prettierignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| rust-toolchain.toml | ||
| turbo.json | ||
| vitest.workspace.ts | ||
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.