Override Module CSS in Your Theme
You cannot override a module's CSS by simply creating a file with the same name in your theme. Instead, use the excludeDirs directive in your theme’s web/tailwind/postcss.config.js file.
Follow these steps to properly override module CSS in your theme:
Steps to Override Module CSS
- Exclude Module CSS:
Add the module directory to theexcludeDirsdirective in your theme’sweb/tailwind/postcss.config.js. This prevents the module's original CSS from being included in the build process.
For details on usingexcludeDirs, refer to Module tailwind-source.css merging. - Copy CSS to Theme:
Copy the module's CSS files you want to override to your theme’sweb/tailwind/themedirectory. This is where you will modify them. - Import New CSS:
In your theme’sweb/tailwind/tailwind-source.cssfile, import the copied CSS files. This ensures your theme’s version of the CSS is loaded instead of the module’s default. - Customize CSS:
Edit and customize the CSS files in your theme's directory to match your design or functionality requirements.