Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classes cannot be used by @apply #4

Open
pandroid opened this issue Apr 18, 2018 · 1 comment
Open

Classes cannot be used by @apply #4

pandroid opened this issue Apr 18, 2018 · 1 comment

Comments

@pandroid
Copy link

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.

@bradlc
Copy link
Owner

bradlc commented Apr 18, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants