webcomponents / webcomponents/polyfills

[ShadyCSS] error scoping distributed content

Open
#20 2 comments 0 reactions 0 assignees View on GitHub
Package: shadycss Severity: High Type: Bug wontfix
Dominant language
HTML
Stars
1.2k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

`` has a `shadowRoot` that looks like this (notice it wraps the slot with a div, "for reasons"):
```html



```
and `` has a `shadowRoot` with a `` in it.

With ShadyCSS enabled, content distributed into `` is wrongly scoped to it, nullifying styles set from the scope above, e.g. http://jsbin.com/mipoci/1/edit?html,output
```html


.bg-color { background: orange; }

am I orange?

```
results in the div having the classes `bg-color style-scope outer-element` instead of just `bg-color`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.