Skip to content

How to use !important in v4 #15803

Answered by wongjn
nathan30 asked this question in Help
Jan 24, 2025 · 2 comments · 9 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 9 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
6 replies
@albanotoskasf
Comment options

@wongjn
Comment options

wongjn Jun 11, 2025
Collaborator

@albanotoskasf
Comment options

@wongjn
Comment options

wongjn Jun 11, 2025
Collaborator

@albanotoskasf
Comment options

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