Skip to content

CSSRule

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

CSSRule is an interface in idl/cssom.webidl, 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 4
attribute
attribute DOMString cssText;
int32_t niso_css_rule_get_css_text(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_css_rule_set_css_text(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
readonly attribute CSSRule? parentRule;
int32_t niso_css_rule_get_parent_rule(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute CSSStyleSheet? parentStyleSheet;
int32_t niso_css_rule_get_parent_style_sheet(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute unsigned short type;
int32_t niso_css_rule_get_type(niso_dom* dom, niso_handle self, uint16_t* out);
const
const unsigned short STYLE_RULE = 1;
const
const unsigned short CHARSET_RULE = 2;
const
const unsigned short IMPORT_RULE = 3;
const
const unsigned short MEDIA_RULE = 4;
const
const unsigned short FONT_FACE_RULE = 5;
const
const unsigned short PAGE_RULE = 6;
const
const unsigned short MARGIN_RULE = 9;
const
const unsigned short NAMESPACE_RULE = 10;
const
const unsigned short KEYFRAMES_RULE = 7;
const
const unsigned short KEYFRAME_RULE = 8;
const
const unsigned short SUPPORTS_RULE = 12;