The CSSStyleSheet
interface represents a single CSS style sheet. It inherits properties and methods from its parent, StyleSheet
.
Documentation CSSStyleSheet by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
Variables
read onlycssRules:CSSRuleList
Returns a live CSSRuleList
, listing the CSSRule
objects in the style sheet.
This is normally used to access individual rules like this:
styleSheet.cssRules[i] // where i = 0..cssRules.length-1
To add or remove items in cssRules
, use the CSSStyleSheet
's deleteRule()
and insertRule()
methods, described below.
Methods
deleteRule(index:Int):Void
Deletes a rule at the specified position from the style sheet.
Throws:
null | DOMError |
---|
insertRule(rule:String, index:Int = 0):Int
Inserts a new rule at the specified position in the style sheet, given the textual representation of the rule.
Throws:
null | DOMError |
---|