Responsive modifiers for components not working in tailwind 4 #18048
Unanswered
KonstantinVlasov
asked this question in
Help
Replies: 1 comment
-
You could do something like: @layer components {
.button {
@apply h-10;
&.is-small { @apply h-8; }
}
@utility is-big {
@layer components {
&.button {
@apply h-12;
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Tailwind CSS are you using?
v4.1.7
Describe your issue
Hi! Thank you for your big work with tailwind 4.
We have a problem with responsive modifiers for our components using tailwind 4.
Example usage:
<div class="button is-small sm:is-big">example</div>
With tailwind 3 it's very easy to implement:
How we can achive this using tailwind 4?
@utility
don't working as expectedBeta Was this translation helpful? Give feedback.
All reactions