A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/CSSRuleList/length below:

CSSRuleList: length property - Web APIs

MDN Web Docs
  1. Web
  2. Web APIs
  3. CSSRuleList
  4. length

Filter sidebar

In this article
  1. CSS Object Model (CSSOM)
  2. CSSRuleList
  3. Instance properties
    1. length
  4. Instance methods
    1. item()
  5. Related pages for CSSOM
    1. CSS
    2. CSSConditionRule
    3. CSSFontFeatureValuesRule
    4. CSSFontPaletteValuesRule
    5. CSSGroupingRule
    6. CSSImportRule
    7. CSSKeyframeRule
    8. CSSKeyframesRule
    9. CSSLayerBlockRule
    10. CSSLayerStatementRule
    11. CSSMediaRule
    12. CSSNamespaceRule
    13. CSSPageDescriptors
    14. CSSPageRule
    15. CSSPropertyRule
    16. CSSRule
    17. CSSStartingStyleRule
    18. CSSStyleDeclaration
    19. CSSStyleRule
    20. CSSStyleSheet
    21. CSSSupportsRule
    22. CaretPosition
    23. MediaList
    24. MediaQueryList
    25. Screen
    26. StyleSheet
    27. StyleSheetList
  6. Guides
    1. CSS Declaration
    2. CSS Declaration Block
    3. Determining the dimensions of elements
    4. Managing screen orientation
    5. Using dynamic styling information
In this article CSSRuleList: length property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

The length property of the CSSRuleList interface returns the number of CSSRule objects in the list.

Value

An integer.

Examples

In the following example the number of items in the CSSRuleList named myRules is printed to the console.

js

let myRules = document.styleSheets[0].cssRules;
console.log(myRules.length);
Specifications Specification CSS Object Model (CSSOM)
# dom-cssrulelist-length
Browser compatibility Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on Apr 7, 2023 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4