Skip to content

CSSStyleSheet

Generated from idl/cssom.webidl when the site was built at 7aa23e2.

CSSStyleSheet is an interface in idl/cssom.webidl, inheriting StyleSheet, exposed in Window. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
CSS object model Widely available Partial 55% 123 of 221 subtests pass 5
attribute
readonly attribute CSSRule? ownerRule;
int32_t niso_css_style_sheet_get_owner_rule(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
[SameObject] readonly attribute CSSRuleList cssRules;
int32_t niso_css_style_sheet_get_css_rules(niso_dom* dom, niso_handle self, niso_handle* out);
operation
unsigned long insertRule(DOMString rule, optional unsigned long index = 0);
int32_t niso_css_style_sheet_insert_rule(niso_dom* dom, niso_handle self, const char* rule, size_t rule_len, uint32_t index, uint32_t* out);
operation
undefined deleteRule(unsigned long index);
int32_t niso_css_style_sheet_delete_rule(niso_dom* dom, niso_handle self, uint32_t index);
attribute
[SameObject] readonly attribute CSSRuleList rules;
int32_t niso_css_style_sheet_get_rules(niso_dom* dom, niso_handle self, niso_handle* out);
operation
long addRule(optional DOMString selector = "undefined", optional DOMString style = "undefined", optional unsigned long index);
int32_t niso_css_style_sheet_add_rule(niso_dom* dom, niso_handle self, const char* selector, size_t selector_len, const char* style, size_t style_len, bool has_index, uint32_t index, int32_t* out);
operation
undefined removeRule(optional unsigned long index = 0);
int32_t niso_css_style_sheet_remove_rule(niso_dom* dom, niso_handle self, uint32_t index);

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • CSSStyleSheet (Constructed stylesheets)
  • replace (Constructed stylesheets)
  • replaceSync (Constructed stylesheets)