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
Scoped css? #94
Comments
Great intuition. Several of us have thought about this opportunity and are thinking about approaches very similar to what you suggest. One of the benefits of defining style rules and css class specifications in JavaScript, is that you can use the full power of JavaScript to define styles, which we already have ways to model dependencies for. We wouldn't need another language like SASS or Less. Also, as you mention, since we also own the rendering/abstraction framework, we can ensure that we don't polute the CSS namespace. We can also ensure that components don't target nodes/class names that should be considered an implementation detail (concern) of a deeper component. |
You can do the following right now:
Let's close this out until someone comes with a real proposal :) |
Rename "owner stack" label to "rendered by"
Experimenting with CI configs to better support Stack Attack
Experimenting with CI configs to better support Stack Attack
The way React renders DOM is really interesting. I was wondering if there's any plan to include a functionality that sets the style of the rendered content without css name pollution. Something like the following:
And initialize the style at the beginning by changing the key to something unique, say
fruit-abrt2
(same for the rendered class name). Of course, then there's the concern that a css rule might not reachfruit
anymore since the class name doesn't actually exists, but I see such a huge benefit here that I believe it's worth thinking over this and find a solution.The text was updated successfully, but these errors were encountered: