The speak-as descriptor specifies how a counter symbol constructed with a given @counter-style will be represented in the spoken form. For example, an author can specify a counter symbol to be either spoken as its numerical value or just represent it with an audio cue.
The value of the speak-as descriptor can be auto, bullets, numbers, words, spell-out, or the name of another counter style.
| Related at-rule | @counter-style |
|---|---|
| Initial value | auto |
| Media | all |
| Computed value | as specified |
| Canonical order | the unique non-ambiguous order defined by the formal grammar |
/* Keyword values */ speak-as: auto; speak-as: bullets; speak-as: numbers; speak-as: words; speak-as: spell-out; /* @counter-style name value */ speak-as: <counter-style-name>;
speak-as is specified as auto, then the effective value of speak-as will be determined based on the value of the system descriptor. If the value of system is alphabetic, then the effective value of speak-as will be spell-out. If system is cyclic, the effective value of speak-as will be bullets. If system is extends, the value of speak-as will be the same as if speak-as: auto is specified on the extended style. For all other cases, the specifying auto has the same effect as specifying speak-as: numbers.speak-as was numbers.fallback descriptor. If the specified style does not exist, speak-as descriptor assumes the value auto.auto | bullets | numbers | words | spell-out | <counter-style-name>where
<counter-style-name> = <custom-ident>
<ul class="list"> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> <li>Five</li> </ul>
@counter-style speak-as-example {
system: fixed;
symbols: ;
suffix: " ";
speak-as: numbers;
}
.list {
list-style: speak-as-example;
} | Specification | Status | Comment |
|---|---|---|
| CSS Counter Styles Level 3 The definition of 'speak-as' in that specification. | Candidate Recommendation | Initial definition |
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | No support | 33 (33) | No support | No support | No support |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | No support | 33 (33) | No support | No support | No support |
list-style, list-style-image, list-style-position
symbols(), the functional notation creating anonymous counter styles.
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/@counter-style/speak-as