Skip to content

CSSStyleDeclaration

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

CSSStyleDeclaration is an interface in idl/html.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 8
attribute
attribute DOMString cssText;
int32_t niso_css_style_declaration_get_css_text(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_css_style_declaration_set_css_text(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
readonly attribute unsigned long length;
int32_t niso_css_style_declaration_get_length(niso_dom* dom, niso_handle self, uint32_t* out);
operation
getter DOMString item(unsigned long index);
int32_t niso_css_style_declaration_item(niso_dom* dom, niso_handle self, uint32_t index, niso_str* out);
operation
DOMString getPropertyValue(DOMString property);
int32_t niso_css_style_declaration_get_property_value(niso_dom* dom, niso_handle self, const char* property, size_t property_len, niso_str* out);
operation
DOMString getPropertyPriority(DOMString property);
int32_t niso_css_style_declaration_get_property_priority(niso_dom* dom, niso_handle self, const char* property, size_t property_len, niso_str* out);
operation
undefined setProperty(DOMString property, [LegacyNullToEmptyString] DOMString value, optional [LegacyNullToEmptyString] DOMString priority = "");
int32_t niso_css_style_declaration_set_property(niso_dom* dom, niso_handle self, const char* property, size_t property_len, const char* value, size_t value_len, const char* priority, size_t priority_len);
operation
DOMString removeProperty(DOMString property);
int32_t niso_css_style_declaration_remove_property(niso_dom* dom, niso_handle self, const char* property, size_t property_len, niso_str* out);
static operation not in JS
[NisoInternal] static sequence<DOMString> supportedProperties();
int32_t niso_css_style_declaration_supported_properties(niso_dom* dom, niso_strs* out);

The CSS properties stylo supports, aliases included, for the glue’s camel-cased attributes.

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.

  • @@iterator (CSS object model)
  • parentRule (CSS object model)