An object implementing the CSSRule
DOM interface represents a single CSS rule. References to a CSSRule
-implementing object may be obtained by looking at a CSS style sheet's cssRules
list.
There are several kinds of rules. The CSSRule
interface specifies the properties common to all rules, while properties unique to specific rule types are specified in the more specialized interfaces for those rules' respective types.
"h1,h2 { font-size: 16pt }"
Setter throws DOMException.null
. E.g. if this rule is a style rule inside an @media
block, the parent rule would be that CSSMediaRule
.CSSStyleSheet
object for the style sheet that contains this rule