-
Notifications
You must be signed in to change notification settings - Fork 13
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
don't localize imported values in selectors #13
don't localize imported values in selectors #13
Conversation
@evilebottnawi this is, I think, a better alternative to css-modules/postcss-modules-scope#4 and needed before webpack-contrib/css-loader#894 |
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
- Coverage 99.63% 99.31% -0.33%
==========================================
Files 2 2
Lines 273 291 +18
Branches 86 91 +5
==========================================
+ Hits 272 289 +17
- Misses 1 2 +1
Continue to review full report at Codecov.
|
Good job! Can you describe more verbosely what PR do for other developers. Also looks we have regression, can you look on this webpack-contrib/css-loader#906? |
hm, looks like we should release this as major version, right? |
I would probably bump the major to be safe yeah. |
checkin: I am done here, unless there is something you'd like me to change :) |
All god, thanks for PR |
awesome thanks! |
This PR adds support for using imported values as selectors. Previously if an imported value (like a class name) was used in a selector it would get replaces correctly, but then would be made
:local()
which ends up resulting in the classname getting hashed again later and removing the reference to the original value.This prevents that by treating an instance of a imported key in a selector as if it was global so that it's not localized. You can also avoid this behavior by explicitly making the selector
:local()