The API provides a way to create CSSStyleSheet objects from script without needing <style> or <link> elements. Script can optionally modify the stylesheet by adding, removing, or replacing rules in it. Each stylesheet object can then be adopted/used in multiple tree scopes (document/shadow roots). Not only does this reduce memory duplication, it also allows an element’s styles to be modified in a single location.
Specification being incubated in a Community Group
Status in Chromium
Enabled by default
Consensus & Standardization
- No signal
Search tagsCSS, StyleSheet, Custom Elements,
Last updated on 2021-12-13