-
Notifications
You must be signed in to change notification settings - Fork 300
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
Locally Scoped Styles #57
Comments
Hey @dav-is thanks for raising the question, only the Styles in resources are globally scoped and should be used for 3rd party library. |
The classnames aren’t scoped. It uses |
See “modules” in the css-loader repo. Seems to be set to false in the repo when it should be true |
@dav-is For development mode only there is style_${classname} for production mode that gets converted to module scoped with hash.
|
That’s an issue. CSS doesn’t behave consistently. |
Creating hash during development is really a heavy process... That is the reason hash is only included in production mode. Can you please explain a scenario where this can cause issue? |
I created a grid in layout.js. The main div had class name of “grid” and it’s children had the classnames of “header”, “decor”, “content”, “nav”, and “footer”. Inside the nav div there’s a <Header /> component. I gave one of the child elements in there the classname of “nav” again and it merged the styles between the two separate classes.
Could we do `style_${className}_${componentName}`
… On Dec 16, 2017, at 1:11 AM, Tirth Bodawala ***@***.***> wrote:
Creating hash during development is really a heavy process... That is the reason hash is only included in production mode. Can you please explain a scenario where this can cause issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Right now Styles are globally scoped. I don’t see a benifit in this and it has only caused conflicts between components. Can we change this to a local scope?
The text was updated successfully, but these errors were encountered: