Skip to content
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

Styles declared in a component's shadowRoot should not leak out of the component #70

Closed
sorvell opened this issue Feb 9, 2013 · 1 comment
Assignees
Labels

Comments

@sorvell
Copy link
Contributor

sorvell commented Feb 9, 2013

When using the shadowDOM shim, styles defined in component templates are leaked outside the component e.g.

< element ... >
< template >
< style >
button {
background: red;
}
...

This will style all buttons rather than buttons inside the element. When scoped stylesheets are used, this behavior is mostly mitigated. When scoped stylesheets are not supported, we can polyfill basic support by modifying rules to be scoped to the element.

@ghost ghost assigned sorvell Feb 9, 2013
@frankiefu
Copy link
Member

This is now shimmed by toolkit when ShadowDOM polyfill is active via re-writing the selector as "element-name button."

dfreedm pushed a commit that referenced this issue Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants