fallback
Quick Summary for fallback (@counter-style)
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.
Code Usage for fallback (@counter-style)
/* Keyword values */ fallback: lower-alpha; fallback: custom-gangnam-style; 
More Details for fallback (@counter-style)

fallback

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

/* Keyword values */ fallback: lower-alpha; fallback: custom-gangnam-style; 

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 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 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

Related at-rule@counter-style
Initial valuedecimal
Computed valueas specified

Formal syntax

<counter-style-name>

where <counter-style-name> = <custom-ident>

Examples

Specifying a fallback counter style

HTML
<ul class="list">   <li>One</li>   <li>Two</li>   <li>Three</li>   <li>Four</li>   <li>Five</li> </ul> 
CSS
@counter-style fallback-example {   system: fixed;   symbols: "\24B6" "\24B7" "\24B8";   fallback: upper-alpha; }  .list {   list-style: fallback-example; } 
Result

Specifications

Specification
CSS Counter Styles Level 3 # counter-style-fallback

See also

list-style, list-style-image, list-style-position symbols(): the functional notation creating anonymous counter styles

Last modified: Dec 20, 2021, by MDN contributors

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
When I realized that, no individual step is hard in any process. Building this airport I'm standing in right now started with a guy writing the architectural plans on paper. That's not hard for him to do. Then laying the first beam isn't had. The whole thing is really hard. So, just take each step kind of piece by piece and when I was able to do that and stop trying to chase this prize and started putting in the work, things just started coming together.
Unknown
Random CSS Property

height

The height CSS property specifies the height of an element. By default, the property defines the height of the content area. If box-sizing is set to border-box, however, it instead determines the height of the border area.
height css reference