Posts Learn Snippets Categories Tags 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


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,

Created by

PostSrc poster


Full stack developer mainly focusing on the front end side of the web. The main author of PostSrc and loves writing tutorial and guides online.