Posts Learn Components Snippets Categories Tags Tools new About
/

Set TailwindCSS Utilities Important

Learn how to set TailwindCSS utilities values to important and ensure class specified on the element have more importance

Created on Jun 28, 2021

37 views

Sometimes you might come across a problem where TailwindCSS classes won't apply/take effect to an existing application's predefined classes. This is caused by CSS specificity where the order of importance is higher/more important than TailwindCSS utility classes.

To solve this the "important" option must be used which then will make sure that all of the classes will now be generated as "!important".

// tailwind.config.js

module.exports = {
  important: true,
}

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

Load comments for Set TailwindCSS Utilities Important

)