tailwindcss-fluid icon indicating copy to clipboard operation
tailwindcss-fluid copied to clipboard

Classes cannot be used by @apply

Open pandroid opened this issue 6 years ago • 1 comments

If I try to use the plugin classes with @apply in a css file I get an error message

CssSyntaxError: /Applications/MAMP/htdocs/dhl-adressen-4/00_dev/src/css/comp onents/headlines.css:46:3: `@apply` cannot be used with `.dhl-text-3x-fluid` because `.dhl-text-3x-fluid` either cannot be found, or it's actual definit ion includes a pseudo-selector like :hover, :active, etc. If you're sure tha t `.dhl-text-3x-fluid` exists, make sure that any `@import` statements are b eing properly processed *before* Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.

pandroid avatar Apr 18 '18 07:04 pandroid

I don’t think it’s possible for the same reason you can’t use @apply with responsive variants of Tailwind class names such as sm:w-full – the fluid utilities also contain media queries.

Might be worth adding a note to the readme?

bradlc avatar Apr 18 '18 10:04 bradlc