CSS Modules duplicates composes
dependencies onto page, re-declaring classes
#15683
Open
7 tasks done
Labels
Describe the bug
I'm facing a problem with the
composes
feature in CSS Modules using LightningCSS. It seems to duplicate the base class it's composing, causing a re-declaration. Consequently, this re-declaration overwrites styles from components loaded earlier that also composes the same base class, dominating in specificity and altering their intended look.Disabling LightningCSS resolves the issue, but there are other problems with PostCSS (e.g., #10079).
Reproduction
https://stackblitz.com/edit/vitejs-vite-vf7fy6?file=vite.config.js
Steps to reproduce
Just load the StackBlitz.
For context, I'm encountering this problem in a Vue.js app. But the reproduction minimizes it down to just JS + CSS Modules.
System Info
Used Package Manager
npm
Logs
No response
Validations
Tasks
The text was updated successfully, but these errors were encountered: