From 437ef3ce0c66029c77f47f2c6f9bf9747ca6cd2e Mon Sep 17 00:00:00 2001 From: "Tommy D. Rossi" Date: Fri, 24 Apr 2026 13:46:59 +0200 Subject: [PATCH 1/3] fix(@tailwindcss/vite): include Variants in feature detection check CSS files that only use @variant (without @apply, theme(), or utilities) were silently skipped by the Vite plugin because Features.Variants was not included in the feature detection bitmask. This caused @variant directives to be passed through raw to the browser, which drops them as unknown at-rules. Fixes tailwindlabs/tailwindcss#19964 --- packages/@tailwindcss-vite/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts index b0c25b5d7fe6..519ef17df680 100644 --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -523,7 +523,7 @@ class Root { if ( !( this.compiler.features & - (Features.AtApply | Features.JsPluginCompat | Features.ThemeFunction | Features.Utilities) + (Features.AtApply | Features.JsPluginCompat | Features.ThemeFunction | Features.Utilities | Features.Variants) ) ) { return false From 3d9630302fba29eaf84e9a37b965f296c4c3d85f Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 24 Apr 2026 15:57:15 +0200 Subject: [PATCH 2/3] format --- packages/@tailwindcss-vite/src/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts index 519ef17df680..caf8945095eb 100644 --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -523,7 +523,11 @@ class Root { if ( !( this.compiler.features & - (Features.AtApply | Features.JsPluginCompat | Features.ThemeFunction | Features.Utilities | Features.Variants) + (Features.AtApply | + Features.JsPluginCompat | + Features.ThemeFunction | + Features.Utilities | + Features.Variants) ) ) { return false From 71e9ea2cc9ef7a06e3380942b1553533c85bd286 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 24 Apr 2026 15:57:52 +0200 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d7e57da1da4..33c0cf83cf4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Ensure `@plugin` resolves package JavaScript entries instead of browser CSS entries when using `@tailwindcss/vite` ([#19949](https://github.com/tailwindlabs/tailwindcss/pull/19949)) +- Ensure CSS files containing `@variant` are processed by `@tailwindcss/vite` ([#19966](https://github.com/tailwindlabs/tailwindcss/pull/19966)) ## [4.2.4] - 2026-04-21