Gets a list of CSS rules of a style sheet.
Note: This property is read-only.
var rules = stylesheet.cssRules;
Returns an object of type DOM NodeDOM Node
Of type CSSRuleList. A list of CSS rules within a style sheet.
The list retrieved includes both rule sets (at-rules. Rules are returned in the same order as they are listed in the parent object. Rules that were dropped during parsing (for instance, because of syntax errors) are not included. However, rules that use a selector or property that Windows Internet Explorer does not recognize are included in the list.
- DOM Level 2 Style
Microsoft Developer Network: [Windows Internet Explorer API reference Article]