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/CSSRule/parentStyleSheet below:

CSSRule: parentStyleSheet property - Web APIs

MDN Web Docs
  1. Web
  2. Web APIs
  3. CSSRule
  4. parentStyleSheet

Filter sidebar

In this article
  1. CSS Object Model (CSSOM)
  2. CSSRule
  3. Instance properties
    1. cssText
    2. parentRule
    3. parentStyleSheet
    4. type Deprecated
  4. 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. CSSRuleList
    17. CSSStartingStyleRule
    18. CSSStyleDeclaration
    19. CSSStyleRule
    20. CSSStyleSheet
    21. CSSSupportsRule
    22. CaretPosition
    23. MediaList
    24. MediaQueryList
    25. Screen
    26. StyleSheet
    27. StyleSheetList
  5. 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 CSSRule: parentStyleSheet 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 parentStyleSheet property of the CSSRule interface returns the StyleSheet object in which the current rule is defined.

Value

A StyleSheet object.

Examples

js

const docRules = document.styleSheets[0].cssRules;
console.log(docRules[0].parentStyleSheet === document.styleSheets[0]); // returns true
Specifications Specification CSS Object Model (CSSOM)
# dom-cssrule-parentstylesheet
Browser compatibility Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on May 27, 2025 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