CSSRule.parentStyleSheet
parentStyleSheet は CSSRule インターフェイスのプロパティで、現在のルールを定義している StyleSheet オブジェクトを返します。
値
StyleSheet オブジェクトです。
例
js
const docRules = document.styleSheets[0].cssRules;
console.log(docRules[0].parentStyleSheet == document.styleSheets[0]); // returns true
仕様書
| Specification |
|---|
| CSS Object Model (CSSOM) # dom-cssrule-parentstylesheet |
ブラウザーの互換性
BCD tables only load in the browser