• Skip to main content
  • Skip to search
  • Skip to select language
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. CSSGroupingRule
  4. CSSGroupingRule.cssRules

Table of contents

  • Value
  • Examples
  • Specifications
  • Browser compatibility

CSSGroupingRule.cssRules

The cssRules property of the CSSGroupingRule interface returns a CSSRuleList containing a collection of CSSRule objects.

Value

a CSSRuleList.

Examples

let myRules = document.styleSheets[0].cssRules;
console.log(myRules);

Specifications

Specification
CSS Object Model (CSSOM)
# dom-cssgroupingrule-cssrules

Browser compatibility

BCD tables only load in the browser

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Mar 23, 2022, by MDN contributors

Related Topics

  1. CSS Object Model
  2. CSSGroupingRule
  3. Properties
    1. cssRules
  4. Methods
    1. deleteRule()
    2. insertRule()
  5. Inheritance:
    1. CSSRule
  6. Related pages for CSSOM
    1. AnimationEvent
    2. CSS
    3. CSSConditionRule
    4. CSSKeyframeRule
    5. CSSKeyframesRule
    6. CSSMediaRule
    7. CSSNamespaceRule
    8. CSSPageRule
    9. CSSRule
    10. CSSRuleList
    11. CSSStyleDeclaration
    12. CSSStyleRule
    13. CSSStyleSheet
    14. CSSSupportsRule
    15. CaretPosition
    16. LinkStyle
    17. MediaQueryList
    18. MediaQueryListListener
    19. Screen
    20. StyleSheet
    21. StyleSheetList
    22. TransitionEvent
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2022 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies