Firefox Tomorrow

web api instance property

CSSRule: parentStyleSheet property

View on MDN ↗

The parentStyleSheet property of the CSSRule interface returns the StyleSheet object in which the current rule is defined.

Value

A StyleSheet object.

Examples

const docRules = document.styleSheets[0].cssRules;
console.log(docRules[0].parentStyleSheet === document.styleSheets[0]); // returns true

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.