Skip to content

Commit 7b04a70

Browse files
committed
[css-counter-styles-3] Add a note to 'symbols' about the syntax of idents.
1 parent f22b14a commit 7b04a70

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

css-counter-styles-3/Overview.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,6 +1351,15 @@ <h3 id=counter-style-symbols><span class=secno>3.7. </span> Marker
13511351
object size</a> of an image <a href="#counter-symbol"><i>counter
13521352
symbol</i></a> is a 1em by 1em square.
13531353

1354+
<p class=note> If using identifiers rather than strings to define the
1355+
symbols, be aware of the syntax of identifiers. In particular, ascii
1356+
non-letters like "*" are not identifiers, and so must be quoted in a
1357+
string. Hex escapes, used in several of the counter styles defined in this
1358+
specification, "eat" the following space (to allow a digit to follow a hex
1359+
escape without ambiguity), so two spaces must be put after a hex escape to
1360+
separate it from the following one, or else they'll be considered
1361+
adjacent, and part of the same identifier.
1362+
13541363
<h3 id=counter-style-speak-as><span class=secno>3.8. </span> Speech
13551364
Synthesis: the ‘<a href="#descdef-speak-as"><code
13561365
class=property>speak-as</code></a>’ descriptor</h3>

css-counter-styles-3/Overview.src.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,20 @@ <h3 id='counter-style-symbols'>
921921
Images are rendered as inline replaced elements.
922922
The <a href="http://dev.w3.org/csswg/css3-images/#default-object-size">default object size</a> of an image <i>counter symbol</i> is a 1em by 1em square.
923923

924+
<p class='note'>
925+
If using identifiers rather than strings to define the symbols,
926+
be aware of the syntax of identifiers.
927+
In particular, ascii non-letters like "*" are not identifiers,
928+
and so must be quoted in a string.
929+
Hex escapes,
930+
used in several of the counter styles defined in this specification,
931+
"eat" the following space
932+
(to allow a digit to follow a hex escape without ambiguity),
933+
so two spaces must be put after a hex escape
934+
to separate it from the following one,
935+
or else they'll be considered adjacent,
936+
and part of the same identifier.
937+
924938

925939
<h3 id='counter-style-speak-as'>
926940
Speech Synthesis: the 'speak-as' descriptor</h3>

0 commit comments

Comments
 (0)