Overriding @apply
When defining a custom Tailwind class with the @apply
directive, it will have a higher specificity than the inline tailwind utilities.
There are 2 ways to avoid this:
- import the
@import "tailwind/utilities"
after the custom code. - set
important: true
in the tailwind config1, this will add important to all tailwind utilities.