@@ -653,6 +653,12 @@ Automatic Numbering With Counters</h2>
653
653
the <dfn export>counter properties</dfn> 'counter-increment' , 'counter-set' and 'counter-reset' ,
654
654
and used with the ''counter()'' and ''counters()'' [=functional notations=] .
655
655
656
+ Counters are referred to in CSS syntax
657
+ using the <dfn><<counter-name>></dfn> type,
658
+ which represents their name as a <<custom-ident>> .
659
+ A <<counter-name>> name cannot match the keyword ''none'' ;
660
+ such an identifier is [=invalid=] as a <<counter-name>> .
661
+
656
662
Resolving [=counter=] values on a given element is a multi-step process:
657
663
658
664
1. Existing counters are [=inherit counters|inherited=] from previous elements.
@@ -676,7 +682,7 @@ Creating Counters: the 'counter-reset' property</h3>
676
682
677
683
<pre class="propdef">
678
684
Name : counter-reset
679
- Value : [ <<custom-ident >> <<integer>>? ]+ | none
685
+ Value : [ <<counter-name >> <<integer>>? ]+ | none
680
686
Initial : none
681
687
Applies to : all elements
682
688
Inherited : no
@@ -696,9 +702,9 @@ Creating Counters: the 'counter-reset' property</h3>
696
702
<dd>
697
703
This element does not create any new counters.
698
704
699
- <dt> <dfn><<custom-ident >> <<integer>>?</dfn>
705
+ <dt> <dfn><<counter-name >> <<integer>>?</dfn>
700
706
<dd>
701
- [=Instantiates=] a counter of the given <<custom-ident >> <dfn>counter name</dfn>
707
+ [=Instantiates=] a counter of the given <<counter-name >> <dfn>counter name</dfn>
702
708
with a starting value of the given <<integer>> ,
703
709
defaulting to ''0'' .
704
710
</dl>
@@ -722,15 +728,15 @@ Creating Counters: the 'counter-reset' property</h3>
722
728
See [[css-cascade-4]] .
723
729
</div>
724
730
725
- If multiple instances of the same <<custom-ident >> occur in the property value,
731
+ If multiple instances of the same <<counter-name >> occur in the property value,
726
732
only the last one is honored.
727
733
728
734
<h3 id='increment-set'>
729
735
Manipulating Counter Values: the 'counter-increment' and 'counter-set' properties</h3>
730
736
731
737
<pre class='propdef'>
732
738
Name : counter-increment
733
- Value : [ <<custom-ident >> <<integer>>? ]+ | none
739
+ Value : [ <<counter-name >> <<integer>>? ]+ | none
734
740
Initial : none
735
741
Applies to : all elements
736
742
Inherited : no
@@ -743,7 +749,7 @@ Manipulating Counter Values: the 'counter-increment' and 'counter-set' propertie
743
749
744
750
<pre class='propdef'>
745
751
Name : counter-set
746
- Value : [ <<custom-ident >> <<integer>>? ]+ | none
752
+ Value : [ <<counter-name >> <<integer>>? ]+ | none
747
753
Initial : none
748
754
Applies to : all elements
749
755
Inherited : no
@@ -765,7 +771,7 @@ Manipulating Counter Values: the 'counter-increment' and 'counter-set' propertie
765
771
<dd>
766
772
This element does not alter the value of any counters.
767
773
768
- <dt> <dfn><<custom-ident >> <<integer>>?</dfn>
774
+ <dt> <dfn><<counter-name >> <<integer>>?</dfn>
769
775
<dd>
770
776
Sets (for 'counter-set' ) or increments (for 'counter-increment' )
771
777
the value of the named counter on the element
@@ -796,7 +802,7 @@ Manipulating Counter Values: the 'counter-increment' and 'counter-set' propertie
796
802
</pre>
797
803
</div>
798
804
799
- If multiple instances of the same <<custom-ident >> occur in the property value,
805
+ If multiple instances of the same <<counter-name >> occur in the property value,
800
806
they are all processed, in order.
801
807
Thus increments will compound,
802
808
but only the last set value will take effect.
@@ -1153,8 +1159,8 @@ Outputting Counters: the ''counter()'' and ''counters()'' functions</h3>
1153
1159
1154
1160
<pre>
1155
1161
<dfn><<counter>></dfn> = <<counter()>> | <<counters()>>
1156
- <dfn>counter()</dfn> = counter( <<custom-ident >> , [ <<counter-style>> | none ] ? )
1157
- <dfn>counters()</dfn> = counters( <<custom-ident >> , <<string>> , [ <<counter-style>> | none ] ? )
1162
+ <dfn>counter()</dfn> = counter( <<counter-name >> , [ <<counter-style>> | none ] ? )
1163
+ <dfn>counters()</dfn> = counters( <<counter-name >> , <<string>> , [ <<counter-style>> | none ] ? )
1158
1164
</pre>
1159
1165
1160
1166
For both functions, the first argument represents the name of a counter,
@@ -1325,7 +1331,7 @@ Outputting Counters: the ''counter()'' and ''counters()'' functions</h3>
1325
1331
but this is a *little bit* clumsy,
1326
1332
and doesn't work for siblings.)
1327
1333
1328
- Suggestion is to add a <css> counter-value(<<custom-ident >> )</css> function,
1334
+ Suggestion is to add a <css> counter-value(<<counter-name >> )</css> function,
1329
1335
which returns the value of the named counter as an integer,
1330
1336
rather than returning a string.
1331
1337
0 commit comments