Replies: 4 comments 5 replies
-
As per the documentation, you use As an aside, Adam Wathan (creator of Tailwind) does seem to advocate avoiding |
Beta Was this translation helpful? Give feedback.
-
Yeah we no longer intercept |
Beta Was this translation helpful? Give feedback.
-
I see, thanks @philipp-spiess @wongjn. I think I found the docs a little unclear on this. The new Also, I see that this section on using |
Beta Was this translation helpful? Give feedback.
-
One more question regarding custom components and avoiding using @apply. My custom components for buttons (with a "primary" variant) used to look like this:
Rewriting using
Is this the recommended way to write a frequently used component like a Is it good/bad practice to use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This was working in v3. Did I miss some docs about this changing in v4?
What version of Tailwind CSS are you using?
For example: v4.0.6
What build tool (or framework if it abstracts the build tool) are you using?
Seeing this issue in Tailwind Play and all of my tests in various projects.
What version of Node.js are you using?
Whatever Tailwind Play uses.
What browser are you using?
I checked Chrome and Safari.
What operating system are you using?
macOS
Reproduction URL
https://play.tailwindcss.com/CGuICpduPQ
Describe your issue
Define a custom class inside of a layer directive, like this:
Works: The custom works when a breakpoint prefix is not present:
Doesn't work: But does not work once any breakpoint prefix is applied:
Beta Was this translation helpful? Give feedback.
All reactions