Skip to content

[v4] @apply doesn't seem to work even with raw tailwindcss executable #17172

Answered by wongjn
redbeard asked this question in Help
Discussion options

You must be logged in to vote

You're doing something that is wrong in v4.

You need to "register" the class name into Tailwind using the @utility directive like:

 @import "tailwindcss";

-.base-style {
+@utility base-style {
   @apply mx-4;
 }

 .augmented-style { 
   @apply base-style mx-8;
 }

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by redbeard
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants