--- title: cssRule.parentStyleSheet slug: Web/API/CSSRule/parentStyleSheet translation_of: Web/API/CSSRule/parentStyleSheet ---
{{APIRef}}
 

Summary

parentStyleSheet returns the object type of style sheet, in which the rule is defined.

Syntax

stylesheet = cssRule.parentStyleSheet

Parameters

Instance

if (bgRule.parentStyleSheet! = MySheet) {
   // Style alien rule!
}

Letters

See Gecko DOM Reference: event # DOM_styleSheet_Object for more information about the interface type objects stylesheet.

Specification

DOM Level 2 Style - cssRule