question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scoping SCSS under a different body class breaks some components

See original GitHub issue

To 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:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
asudohcommented, Jan 30, 2019

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!

0reactions
carbon-botcommented, Feb 6, 2019

🎉 This issue has been resolved in version 9.70.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found