Skip to content

Commit 9b61bec

Browse files
committed
[css-lists-3] Counters aren't <<string>>, so define them as their own type like we did in CSS2. #1929
1 parent 8d6fc04 commit 9b61bec

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

css-lists-3/Overview.bs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,20 +1081,21 @@ Counters in elements that do not generate boxes</h3>
10811081
Outputting Counters: the ''counter()'' and ''counters()'' functions</h3>
10821082

10831083
Counters have no visible effect by themselves,
1084-
but their values can be used with the ''counter()'' and ''counters()'' functions.
1085-
This happens automatically in ''::marker'' pseudo-elements,
1086-
but can be used by an author anywhere that accepts a <<string>>. Their syntax is:
1084+
but their values can be used
1085+
with the ''counter()'' and ''counters()'' functions,
1086+
which represent the counter values as strings or images.
1087+
Their syntax is:
10871088

10881089
<pre>
1090+
<dfn><<counter>></dfn> = <<counter()>> | <<counters()>>
10891091
<dfn>counter()</dfn> = counter( <<custom-ident>>, [ <<counter-style>> | none ]? )
10901092
<dfn>counters()</dfn> = counters( <<custom-ident>>, <<string>>, [ <<counter-style>> | none ]? )
10911093
</pre>
10921094

10931095
For both functions, the first argument represents the name of a counter,
10941096
and if the last argument is omitted it defaults to ''decimal''.
10951097

1096-
A ''counter()'' represents a <<string>>,
1097-
obtained as follows:
1098+
The used value of ''counter()'' is obtained as follows:
10981099

10991100
<ul>
11001101
<li>
@@ -1127,8 +1128,7 @@ Outputting Counters: the ''counter()'' and ''counters()'' functions</h3>
11271128
</pre>
11281129
</div>
11291130

1130-
A ''counters()'' represents a <<string>>,
1131-
obtained as follows:
1131+
The used value of ''counters()'' is obtained as follows:
11321132

11331133
<ul>
11341134
<li>
@@ -1159,10 +1159,6 @@ Outputting Counters: the ''counter()'' and ''counters()'' functions</h3>
11591159
The function represents the string thus produced.
11601160
</ul>
11611161

1162-
Issue: Counter representations don't have to be strings,
1163-
they can be images sometimes instead.
1164-
What to do?
1165-
11661162
<div class='example'>
11671163
The following example shows a simple use of the ''counters()'' function:
11681164

0 commit comments

Comments
 (0)