We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

CSSRuleList Redirect 1

« CSSRuleList


A CSSRuleList is an array-like object containing an ordered collection of CSSRule objects.


Each CSSRule can be accessed as rules.item(index), or simply rules[index], where rules is an object implementing the CSSRuleList interface, and index is the 0-based index of the rule, in the order as it appears in the style sheet CSS. The number of objects is rules.length.


// get the first style sheet’s first rule
var first_rule = document.styleSheets[0].cssRules[0];

See also

CSSRuleList implementations

There are multiple properties in the CSSOM that will return a CSSRuleList. They are:


Document Tags and Contributors

 Contributors to this page: Sheppy
 Last updated by: Sheppy,