Skip to content

How can I override a CSS file from a module?

It is not possible to override CSS files from modules simply by creating a file with the same name in a theme.

Instead, the excludeDirs directive has to be used in the theme's web/tailwind/postcss.config.js file.

The steps to override a modules CSS in a theme are:

  1. Add the module directory to the excludeDirs directive as described in Module tailwind-source.css merging.
  2. Copy the CSS files from the module to your themes web/tailwind/theme directory.
  3. Import the new files in your themes web/tailwind/tailwind-source.css file.
  4. Customize the CSS files from the module as required.