-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imported local aliases not working when used in selectors #12
Comments
What's the current status on this? There does not appear to have been any movement on it since 2017. This is a pretty significant issue, given that it blocks the main apparent purpose of CSS Modules: the ability to write modular stylesheets. If it's not possible to reference externally-generated class names, it's also not possible to interact (styling-wise) between different components with their own individual style rules. What still needs to happen to get this resolved? What do I need to do/contribute to make this problem go away? |
Yeah this seem to be a bug. Maybe file it in the webpack-contrib/css-loader repo. This is the spec repo. |
It's been filed there, see the references webpack-contrib/css-loader#561 |
An update on this issue:
|
I'm trying to import a class name from one CSS module into another. The find and replace works if I use the local alias as a declaration value but not when used in a selector. For example:
When
bar.scss
is compiled / output, fooClassName hasn't been found and replaced with the generated local-scope class name fromfoo.scss
. However, whenbaz.scss
is compiled / output on the page, the declaration value of thecolor
property does indeed have the correct generated local-scope class name (obviously that's not helpful, but it demonstrates that it pulls through the correct class name, even if the context in which it's being used makes no sense).The ICSS spec mentions:
Unfortunately it's not working as expected. We're using Webpack – is there a special option or flag we need to set to get this working? Appreciate any help.
The text was updated successfully, but these errors were encountered: