Since September 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
The CSSCounterStyleRule interface represents an @counter-style at-rule.
This interface also inherits properties from its parent CSSRule.
CSSCounterStyleRule.nameA string that contains the serialization of the <custom-ident> defined as the name for the associated rule.
CSSCounterStyleRule.systemA string that contains the serialization of the system descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.symbolsA string that contains the serialization of the symbols descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.additiveSymbolsA string that contains the serialization of the additive-symbols descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.negativeA string that contains the serialization of the negative descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.prefixA string that contains the serialization of the prefix descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.suffixA string that contains the serialization of the suffix descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.rangeA string that contains the serialization of the range descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.padA string that contains the serialization of the pad descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.speakAsA string that contains the serialization of the speak-as descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
CSSCounterStyleRule.fallbackA string that contains the serialization of the fallback descriptor defined for the associated rule. If the descriptor was not specified in the associated rule, the attribute returns an empty string.
This interface doesn't implement any specific method but inherits methods from its parent CSSRule.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
CSSCounterStyleRule |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
additiveSymbols |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
fallback |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
name |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
negative |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
pad |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
prefix |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
range |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
speakAs |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
suffix |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
symbols |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
system |
91 | 91 | 33 | 77 | 17 | 91 | 33 | 64 | 17 | 16.0 | 91 | 17 |
@counter-style
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CSSCounterStyleRule