Skip to content

How to use !important in v4 #15803

Answered by wongjn
nathan30 asked this question in Help
Jan 24, 2025 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

You could apply the important modifier tag to each element:

.foo {
  @apply text-2xl! text-red-200!;
}

As an aside, Adam Wathan (creator of Tailwind) does seem to advocate avoiding @apply:

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@suraj50000
Comment options

@wongjn
Comment options

wongjn Jan 24, 2025
Collaborator

@dawnerd
Comment options

Answer selected by nathan30
Comment options

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

wongjn May 13, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants