Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

ShadowRoot.adoptedStyleSheets

3 tags 1 category

The adoptedStyleSheets property of the ShadowRoot interface sets an array of constructed stylesheets to be used by the shadow DOM subtree.

Note: A constructed stylesheet is a stylesheet created programmatically using the CSSStyleSheet() constructor (as compared to one created by a user-agent when importing a stylesheet from a script, imported using style and @import, or linked to via link).

The same constructed stylesheet can be adopted by multiple ShadowRoot instances, and by the parent document (using the Document.adoptedStyleSheets property). Changing an adopted stylesheet will affect all the adopting objects.

Stylesheets in the adoptedStyleSheets property are considered along with the shadow DOM’s other stylesheets. For the purpose of determining the final computed CSS of any element, they are considered to have been added after the other stylesheets in the shadow DOM (ShadowRoot.styleSheets).

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…