-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Utility classes can't be built with @apply and custom props #6321
Comments
same for me =( |
Hey! So we're going to dig into this a little deeper, but as a workaround you can wrap these classes in an @layer utilities {
.a {
@apply b;
}
.b {
@apply uppercase;
color: red;
}
} Here's an updated Play illustrating this: https://play.tailwindcss.com/ksUrE9fW01?file=css |
Hi, I have a lot of custom css classes that I reuse via |
thank you @garymathews for the hint! I rely heavily on twcss for my work (an in-house component framework). This bug made me somewhat worried if my bet on twcss is the correct decision. Till v2 it has appeared rock-solid and very well-maintained. I understand that v3 is still relatively new, however being able to use |
Hey! Thank you for your bug report! This should be fixed in #6938, and will be available in the next release (probably later today). You can already try it by using the insiders build |
What version of Tailwind CSS are you using?
v3.0.0
What build tool (or framework if it abstracts the build tool) are you using?
PostCSS
What version of Node.js are you using?
v14.13.0
What browser are you using?
Chrome
What operating system are you using?
Windows
Reproduction URL
https://play.tailwindcss.com/qm3e5FDSEr
Describe your issue
I've made utility classes that have both Tailwind tokens and custom css. But these classes could no longer be used with
@apply
after upgrading to v3.This seems to be a regression from v2->v3.
I can mitigate the issue for now by duplicating some classes, but that's not a great solution.
The text was updated successfully, but these errors were encountered: