cssom_1 library Null safety
CSS Object Model (CSSOM)
- The interface holds useful CSS-related methods. No objects with this interface are implemented: it contains only static methods and is therefore a utilitarian interface.
The interface of the
CSS Object Modelrepresents any CSS
at-rulethat contains other rules nested within it.
The interface represents an
The interface describes an object representing a single CSS
represents a single CSS
- The interface represents a single CSS rule. There are several types of rules which inherit properties from .
A represents an ordered collection of read-only CSSRule
While the object is read-only, and cannot be directly modified,
it is considered a
liveobject, as the content can change over time. To edit the underlying rules returned by CSSRule objects, use
CSSStyleSheet.deleteRule(), which are methods of CSSStyleSheet. The interface has no constructor. An instance of is returned by
- The interface represents an object that is a CSS declaration block, and exposes style information and various style-related methods and properties. A object can be exposed using three different APIs:
- The interface represents a single CSS style rule.
- 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.
The interface represents the media queries of a stylesheet, e.g.
those set using a
- An object implementing the interface represents a single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface.
The interface represents a list of CSSStyleSheet objects. An
instance of this object can be returned by
Document.styleSheets. It is an array-like object but can't be iterated over using Array methods. However it can be iterated over in a standard
forloop over its indices, or converted to an Array.