A utility-first CSS framework for rapid UI development.
fix(@tailwindcss/vite): include @variant in feature detection (#19966)
Fixes #19964 CSS files imported via JS that only use `@variant` (no `@apply`, `theme()`, or utility classes) are silently skipped by the Vite plugin. The `@variant` directive gets passed through raw to the browser, which drops it as an unknown at-rule. **Root cause** — `Features.Variants` is missing from the [feature detection bitmask](https://github.com/tailwindlabs/tailwindcss/blob/v4.2.4/packages/%40tailwindcss-vite/src/index.ts#L526): ```ts // before Features.AtApply | Features.JsPluginCompat | Features.ThemeFunction | Features.Utilities // after Features.AtApply | Features.JsPluginCompat | Features.ThemeFunction | Features.Utilities | Features.Variants ``` **Reproduction** — https://github.com/remorses/tailwind-variant-bug --------- Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
T
Tommy D. Rossi committed
db27049caaae08978995f25b61f8336f543a4640
Parent: 5a79990
Committed by GitHub <noreply@github.com>
on 4/24/2026, 2:11:48 PM