1

Do CSS resets like normalize.css propagate to the shadow dom? So for example if normalize.css is used in a Polymer application/project, will all the element throughout the dom and shadow dom have the normalize.css resets applied?

TIA, Ole

Ole
  • 41,793
  • 59
  • 191
  • 359

2 Answers2

2

Short answer is no.

You can use all: initial; to reset all your styles inside the component.

"...rules in the parent page have higher specificity than :host,... this allows users to override your top-level styling from the outside."

So if you set styles on your :root or html will get into the shadowDOM

1

No (unless they are inherited by default).

Because the Shadow DOM isolates the CSS styles from the one of the main document, nothing defined in normalize.css will be taken in account in your Shadow DOM.

Supersharp
  • 29,002
  • 9
  • 92
  • 134