Scoping SCSS under a different body class breaks some components
See original GitHub issueTo preview experimental carbon in carbon-components-angular
we generate two preview.scss
files and import carbon under two different containing classes (.carbon
and .experimental
).
As expected some tweaks are required to make this work (manually scoping the reset and fonts for example) … but strangely enough some component styles also break (mainly padding/margins) … see these lines for what I mean. It doesn’t appear to be an issue for X, but it’s definitely unexpected behavior.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
vue.js - Scoped CSS not being applied within the component
When applied, the CSS does not get loaded in. When scoped is removed, it does get applied. However I want to keep it...
Read more >Scoped CSS Doesn't work on dynamic content · Issue #559
When using scoped CSS the styles and the elements are given data- attributes. But when content is added Dynamically it won't have those ......
Read more >CSS Scoping Module Level 1
Abstract. This specification defines various scoping/encapsulation mechanisms for CSS, including scoped styles and the @scope rule, ...
Read more >Scoped CSS
With scoped , the parent component's styles will not leak into child components. However, a child component's root node will be affected by...
Read more >CSS Inheritance, The Cascade And Global Scope
The classes can be applied universally; they instantiate the local scope to affect just their child elements; they inherit styles not set here ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Selector scoping is not a perfect approach, though it works to some extent, and it’s the only viable way until Shadow DOM is supported by all browsers we support. That said, we expect some of the glitches that @cal-smith pointed out. If we see some of those can be solved by
carbon-components
side in a reasonable way we can definitely consider fixing, though. @cal-smith please feel free to share more details if you like - Thanks!🎉 This issue has been resolved in version 9.70.1 🎉
The release is available on:
Your semantic-release bot 📦🚀