Skip to content

Using Tailwind dark variant with custom classes in v4 #18368

Answered by wongjn
moshiur01 asked this question in Help
Discussion options

You must be logged in to vote

Use @utility so that Tailwind "knows" about the class name and thus can apply variants to it:

@utility card-background {
    @apply bg-black;
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@moshiur01
Comment options

Answer selected by moshiur01
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