-
Notifications
You must be signed in to change notification settings - Fork 4.5k
space and divide utilities not working with @apply #1599
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
Comments
1.3.5 didn't fix this for me. |
This is just a limitation of how We're hoping to make For now this is just expected behavior/by design, so I would recommend just writing the CSS manually if you want to reuse these rules in another class. |
Example for reference (you don't need the funky calc/space-x-reverse stuff for your component probably so I've reduced it down to a simple .form-inline {
@apply flex space-x-1 items-center;
}
.form-inline > :not(template) + :not(template) {
@apply ml-4;
} |
Thanks for clarification. This is such a useful thing :-) But for now I'll keep using x + x like a caveman. |
Should this be documented somewhere? The only way we figured this out was by finding this issue...after 15 minutes of trying and 15 minutes of searching. Would it be possible to detect @apply with the applicable classes? The error message just indicates that it's missing. I can try to help, but not sure what the desire or best method would be. |
On 1.3.4, when trying to use something like
space-x-1
with @apply I get the following error:https://codesandbox.io/s/priceless-euclid-2iqpt
The
dist/utilities.css
file contains the space/divide classes, so I'm not sure why@apply
isn't picking them up. I'm wondering if it's because the space/divide classes themselves don't have any css, as they're only used as parent selectors?The text was updated successfully, but these errors were encountered: