CSSStyleSheet class

The interface represents a single CSS stylesheet, and lets you inspect and modify the list of rules contained in the stylesheet. It inherits properties and methods from its parent, StyleSheet.

StyleSheet

CSSStyleSheet

A stylesheet consists of a collection of CSSRule objects representing each of the rules in the stylesheet. The rules are contained in a CSSRuleList, which can be obtained from the stylesheet's cssRules property. For example, one rule might be a CSSStyleRule object containing a style such as: h1, h2 { font-size: 16pt; } Another rule might be an at-rule such as @import or @media, and so forth. See the Obtaining a StyleSheet section for the various ways a object can be obtained. A object can also be directly constructed. The constructor, and the CSSStyleSheet.replace(), and CSSStyleSheet.replaceSync() methods are newer additions to the specification, enabling Constructable Stylesheets.

Implemented types
Available Extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

CSSStyleSheet([CSSStyleSheetInit? options])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited