Path: blob/main/files/en-us/web/css/@counter-style/fallback/index.md
6517 views
------{{CSSRef}}
The fallback descriptor can be used to specify a counter style to fall back to if the current counter style cannot create a marker representation for a particular counter value.
Syntax
Description
If the specified fallback style is also unable to construct a representation, then its fallback style will be used. If a valid fallback style is not specified, it defaults to decimal.
A couple of scenarios where a fallback style will be used are:
When the {{cssxref('@counter-style/range', 'range')}} descriptor is specified for a counter style, the fallback style will be used to represent values that fall outside the range.
When the
fixed{{cssxref('@counter-style/system', 'system')}} is used and there are not enough symbols to cover all the list items, the fallback style will be used for the rest of the list items.
Formal definition
{{cssinfo}}
Formal syntax
{{csssyntax}}
Examples
Specifying a fallback counter style
HTML
CSS
Result
{{ EmbedLiveSample('Specifying_a_fallback_counter_style') }}
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{Cssxref("list-style")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}
{{cssxref("symbols", "symbols()")}}: the functional notation creating anonymous counter styles