package js.html
extends StyleSheet
Available on js
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:
read onlycssRules:CSSRuleListReturns 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-1To add or remove items in cssRules, use the CSSStyleSheet's deleteRule() and insertRule() methods, described below.
read onlyownerRule:CSSRuleIf this style sheet is imported into the document using an @import rule, the ownerRule property will return that CSSImportRule, otherwise it returns null.
deleteRule(index:Int):VoidDeletes a rule at the specified position from the style sheet.
Throws:
null |
DOMError |
|---|
insertRule(rule:String, index:Int = 0):IntInserts a new rule at the specified position in the style sheet, given the textual representation of the rule.
Throws:
null |
DOMError |
|---|
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/CSSStyleSheet.html