8 properties, 2 functions, 1 type defined by this
specification, 10 of them known to at least one browser
(the others are badged Not in any browser yet).
PropertyBaseline: widely availablesince January 2018
MDN The counter-incrementCSS property can be used to increase or decrease the value of the named CSS counters by the specified values, or to prevent all counters or an individual counter's value from being changed.
<section class="default-example" id="default-example"> <div class="transition-all" id="chapters"> <h1>Alice's Adventures in Wonderland</h1> <h2>Down the Rabbit-Hole</h2> <h2 id="example-element">The Pool of Tears</h2> <h2>A Caucus-Race and a Long Tale</h2> <h2>The Rabbit Sends in a Little Bill</h2> </div></section>
Syntax
[ <counter-name> <integer>? ]+ | none
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
none
Applies to
all elements
Inherited
no
Percentages
n/a
Computed value
the keyword none or a list, each item an identifier paired with an integer
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting counter-increment
Chrome
2
Edge
12
Firefox
1
Safari
3
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.
<section class="default-example" id="default-example"> <div class="transition-all" id="chapters"> <h1>Alice's Adventures in Wonderland</h1> <h2>Down the Rabbit-Hole</h2> <h2 id="example-element">The Pool of Tears</h2> <h2>A Caucus-Race and a Long Tale</h2> <h2>The Rabbit Sends in a Little Bill</h2> </div></section>
<section class="default-example" id="default-example"> <div class="transition-all" id="chapters"> <h1>Alice's Adventures in Wonderland</h1> <h2>Down the Rabbit-Hole</h2> <h2 id="example-element">The Pool of Tears</h2> <h2>A Caucus-Race and a Long Tale</h2> <h2>The Rabbit Sends in a Little Bill</h2> </div></section>
Syntax
[ <counter-name> <integer>? ]+ | none
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
none
Applies to
all elements
Inherited
no
Percentages
n/a
Computed value
the keyword none or a list, each item an identifier paired with an integer
Canonical order
per grammar
Animation type
by computed value type
Browser support
First browser version supporting counter-set
Chrome
85
Edge
85
Firefox
68
Safari
17.2
Chrome Android
85
Safari iOS
17.2
First version with support, from MDN browser-compat-data.
<section class="default-example" id="default-example"> <div> <p>NASA Notable Missions</p> <ul class="transition-all" id="example-element"> <li>Apollo 11: First Human Landing</li> <li>City in Space: The International Space Station</li> <li>Great Observatory: The Hubble Space Telescope</li> <li>Everlasting Mars Rovers</li> </ul> </div></section>
Syntax
inside | outside
Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Definition
Initial
outside
Applies to
list items
Inherited
yes
Percentages
n/a
Computed value
keyword, but see prose
Canonical order
per grammar
Animation type
discrete
Browser support
First browser version supporting list-style-position
Chrome
1
Edge
12
Firefox
1
Safari
1
Chrome Android
18
Safari iOS
1
First version with support, from MDN browser-compat-data.
FunctionBaseline: widely availablesince January 2018
Spec Counters have no visible effect by themselves, but their values can be used with the counter() and counters() functions, whose used values represent counter values as strings or images. They are defined as follows:
MDN The counter()CSSfunction returns a string representing the current value of the named counter, if there is one.
FunctionBaseline: widely availablesince January 2018
Spec Counters have no visible effect by themselves, but their values can be used with the counter() and counters() functions, whose used values represent counter values as strings or images. They are defined as follows:
MDN The counters()CSSfunction enables combining markers when nesting counters. The function returns a string that concatenates the current values of the named and nested counters, if any are present, with the string provided. The third, optional parameter enables defining the list style.