-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Description
What version of Tailwind CSS are you using?
v4.0.0
What build tool (or framework if it abstracts the build tool) are you using?
Astro 5.1.9
@tailwindcss/vite 4.0.0
What version of Node.js are you using?
v23.4.0
What browser are you using?
Chrome
What operating system are you using?
Windows
Reproduction URL
https://play.tailwindcss.com/11WjRHqAY2?file=css
Describe your issue
@variant dark will expand if it wraps @media, but not if it's inside it.
I'd expect this
@media (prefers-reduced-motion: reduce) {
@variant dark {
a {
color: red;
}
}
}to become this
@media (prefers-reduced-motion: reduce) {
&:where(.dark, .dark *) {
a {
color: red;
}
}
}but @variant dark remains in the output css.