parentRule property
Retrieves the containing rule, if the current rule is contained inside another rule.
![]() ![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: Object
the containing rule, if the current rule is contained inside another rule (for example, a style rule inside an @media block). If this rule is not nested inside any other rules, this returns null.
Standards information
See also
- CSSFontFaceRule
- CSSImportRule
- CSSMediaRule
- CSSNamespaceRule
- CSSRule
- CSSStyleDeclaration
- currentStyle
- page
- rule
- style
Show:

