tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Custom variants don't work with @scope

Open msfragala opened this issue 2 months ago • 2 comments

What version of Tailwind CSS are you using?

v4.1.13

What build tool (or framework if it abstracts the build tool) are you using?

Next.js 15.5.2

What version of Node.js are you using?

v24.7.0

What browser are you using?

Chrome (v140)

What operating system are you using?

macOS

Reproduction URL

https://play.tailwindcss.com/0NPeZeXJ61

Describe your issue

Custom variants don't work with @scope rules. When defining a custom variant using @scope, the generated code places the rule inside the class instead of the class inside the rule. But @scope rules don't seem to support nesting like this as the resulting class has no effect

msfragala avatar Sep 17 '25 21:09 msfragala