-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
[Discussion] Deprecate :local #308
Comments
I agree, we can reduce some confusion by having 1 less keyword. I can see a (rare) use case for wanting to opt-out within a css module by using |
We also have this problem in https://github.com/facebookincubator/create-react-app: we intentionally don’t support CSS modules but people work around this by using |
I think we should deprecate it. It's totally vestigial, not something that we should encourage people to use going forward. |
Cool. I'll make a PR. |
I actually have an instance in my css-modules-using code where I had to use I am definitely not using |
It's late. Perhaps I'm not reading this correctly. I've had to turn off the modules option to achieve this pattern for my components:
I noticed some suggestions of sprinkling |
Thanks everyone, it is out of scope |
In my mind, it makes more sense to consider local-scope (and CSS Modules by extension) as something that's always on or always off.
I'm seeing a lot of folks hitting the problem where they enable
?modules
and then want to include non-local CSS (e.g. #253) but never in the same file. I think @chrislloyd's suggestion in #287 is a better approach, so you can configure two instances ofcss-loader
, one local and one global, maybe having ".module.css" be local and ".css" be global (like gatsbyjs/gatsby#193).In global CSS files, then, I don't see any reason to keep
:local
, except that that was how CSS Modules got started in the first place. But I'm interested in having a discussion about this because I want to know if anyone's still using:local
and feels it should be kept.The text was updated successfully, but these errors were encountered: