-
Notifications
You must be signed in to change notification settings - Fork 40
Nested @screen causing error with postcss #76
Comments
Right now we expect ~valid CSS as the input to Tailwind, and CSS doesn't actually support nesting so we haven't done anything to handle it (it's a huge increase in scope to take that on ourselves, not out of the question forever but not a 15 minute fix). I would have suggested running .foo {
@screen md {
@apply bg-black;
}
} So I'm afraid the best recommendation right now is to not nested your @screen sm {
.secondaryLinks {
@apply w-auto flex-grow-0;
@apply flex gap-4;
}
}
@screen md {
.secondaryLinks {
@apply w-full;
@apply gap-6;
}
} No plans to support this currently but I will leave this open as a reminder to myself to explicitly throw a helpful error until we can one day do something better. |
I'm not sure this is actually @screen issue, I had the same error just right now, and I removed some @apply directives (rewritten to simple CSS), and everything compiling again. Here is example: Before:
After:
My postcss config:
|
@RomkaLTU The issue is the combination of |
I'm gonna look at adding some error messages around this today |
I'm not sure if it's in the docs, but adding info about it into the docs would also be helpful |
Hi,
I noticed an issue while using nested
@screen
in class:is producing :
moving the
@screen
out of class works again.The text was updated successfully, but these errors were encountered: