CSSCounterStyleRule: speakAs プロパティ

speakAsCSSCounterStyleRule インターフェイスのプロパティで、 speak-as 記述子の値を取得または設定します。この記述子に値が設定されていない場合、この属性は空文字列を返します。

文字列です。

次の例は @counter-style ルールを示しています。 JavaScript では myRules[0] がこの @counter-style ルールであり、 speakAs を返すと "bullets" という値が得られます。

css
@counter-style box-corner {
  system: fixed;
  symbols: ◰ ◳ ◲ ◱;
  suffix: ": ";
  speak-as: bullets;
}
js
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].speakAs); // "bullets"

仕様書

Specification
CSS Counter Styles Level 3
# dom-csscounterstylerule-speakas

ブラウザーの互換性

BCD tables only load in the browser