CSSPropertyRule: inherits プロパティ

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

inheritsCSSPropertyRule インターフェイスの読み取り専用プロパティで、 @property ルールで表現されているカスタムプロパティ登録の継承フラグ、つまり、そのプロパティが既定値では継承されるかどうかを記述した論理値を返します。

論理値です。

このスタイルシートには、単一の @property ルールが格納されています。最初に返される CSSRule は、このルールを表す CSSPropertyRule となります。 inherits プロパティは論理値 false を返します。これは CSS の inherits プロパティの値です。

css
@property --property-name {
  syntax: "<color>";
  inherits: false;
  initial-value: #c0ffee;
}
js
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].inherits); //returns false

仕様書

Specification
CSS Properties and Values API Level 1
# dom-csspropertyrule-inherits

ブラウザーの互換性

BCD tables only load in the browser