forked from w3c/csswg-drafts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsyndata.html
280 lines (183 loc) · 11.1 KB
/
syndata.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>Syntax and basic data types</title>
<link rel="stylesheet" href="style/default.css" type="text/css">
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2016/W3C-ED.css" type="text/css">
<link rel="prev" href="conform.html">
<link rel="next" href="selector.html">
<link rel="contents" href="Overview.html#minitoc">
<link rel="CSS-properties" href="propidx.html" title="properties">
<link rel="index" href="indexlist.html" title="index">
<link rel="first" href="Overview.html">
<script type="text/javascript" src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
<div class="navbar">
<p><a href="conform.html">previous</a>
<a href="selector.html">next</a>
<a href="Overview.html#minitoc">contents</a>
<a href="propidx.html">properties</a>
<a href="indexlist.html">index</a>
</div>
<hr class="navbar">
<h1><a name="q0">4 Syntax and basic data types</a></h1>
<div id="toc" class="subtoc">
<p><strong>Contents</strong>
<ul class="toc">
<li><a href="syndata.html#syntax" class="tocxref">4.1 Syntax</a>
<ul class="toc">
<li><a href="syndata.html#tokenization" class="tocxref">4.1.1 Tokenization</a>
<li><a href="syndata.html#keywords" class="tocxref">4.1.2 Keywords</a>
<ul class="toc">
<li><a href="syndata.html#vendor-keywords" class="tocxref">4.1.2.1 Vendor-specific extensions</a>
<li><a href="syndata.html#vendor-keyword-history" class="tocxref">4.1.2.2 Informative Historical Notes</a>
</ul>
<li><a href="syndata.html#characters" class="tocxref">4.1.3 Characters and case</a>
<li><a href="syndata.html#statements" class="tocxref">4.1.4 Statements</a>
<li><a href="syndata.html#at-rules" class="tocxref">4.1.5 <span class="index-def" title="at-rule"> At-rules</span></a>
<li><a href="syndata.html#block" class="tocxref">4.1.6 Blocks</a>
<li><a href="syndata.html#rule-sets" class="tocxref">4.1.7 Rule sets, declaration blocks, and selectors</a>
<li><a href="syndata.html#declaration" class="tocxref">4.1.8 Declarations and properties</a>
<li><a href="syndata.html#comments" class="tocxref">4.1.9 Comments</a>
</ul>
<li><a href="syndata.html#parsing-errors" class="tocxref">4.2 Rules for handling parsing errors</a>
<li><a href="syndata.html#values" class="tocxref">4.3 Values</a>
<ul class="toc">
<li><a href="syndata.html#numbers" class="tocxref">4.3.1 Integers and real numbers</a>
<li><a href="syndata.html#length-units" class="tocxref">4.3.2 Lengths</a>
<li><a href="syndata.html#uri" class="tocxref">4.3.3 URLs and URIs</a>
<li><a href="syndata.html#counter" class="tocxref">4.3.4 Counters</a>
<li><a href="syndata.html#color-units" class="tocxref">4.3.5 Colors</a>
<li><a href="syndata.html#strings" class="tocxref">4.3.6 Strings</a>
<li><a href="syndata.html#unsupported-values" class="tocxref">4.3.7 Unsupported Values</a>
</ul>
<li><a href="syndata.html#charset" class="tocxref">4.4 CSS style sheet representation</a>
<ul class="toc">
<li><a href="syndata.html#escaping" class="tocxref">4.4.1 Referring to characters not represented in a character encoding</a>
</ul>
</ul>
</div>
<h2>4.1 <a name="syntax">Syntax</a></h2>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.1.1 <a name="tokenization">Tokenization</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.1.2 <a name="keywords">Keywords</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h4>4.1.2.1 <a name="vendor-keywords">Vendor-specific extensions</a></h4>
<p>This section is informative.</p>
<p>This section has been replaced by Section 3 ("Requirements for
Responsible Implementation of CSS") in <cite>CSS Snapshot 2015</cite>
<a href="refs.html#ref-CSS" rel="biblioentry" class="noxref"><span class="informref">[CSS]</span></a>.
<h4>4.1.2.2 <a name="vendor-keyword-history">Informative Historical Notes</a></h4>
<p>This section is informative.</p>
<p>This section has been replaced by Section 3 ("Requirements for
Responsible Implementation of CSS") in <cite>CSS Snapshot 2015</cite>
<a href="refs.html#ref-CSS" rel="biblioentry" class="noxref"><span class="informref">[CSS]</span></a>.
<h3>4.1.3 <a name="characters">Characters and case</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.1.4 <a name="statements">Statements</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.1.5 <span class="index-def" title="at-rule">
<a name="at-rules">At-rules</a></span></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.1.6 <a name="block">Blocks</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.1.7 <a name="rule-sets">Rule sets, declaration blocks, and selectors</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.1.8 <a name="declaration">Declarations</a> and <a
name="properties">properties</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.1.9 <a name="comments">Comments</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h2>4.2 <a name="parsing-errors">Rules for handling parsing
errors</a></h2>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h2>4.3 <a name="values">Values</a></h2>
<h3>4.3.1 <a name="numbers">Integers and real numbers</a></h3>
<p>This section has been replaced by <cite>CSS Values and Units Module
Level 3</cite> <a href="refs.html#ref-CSS3VAL" rel="biblioentry" class="noxref"><span class="normref">[CSS3VAL]</span></a>.
<h3>4.3.2 <a name="length-units">Lengths</a></h3>
<p>This section has been replaced by <cite>CSS Values and Units Module
Level 3</cite> <a href="refs.html#ref-CSS3VAL" rel="biblioentry" class="noxref"><span class="normref">[CSS3VAL]</span></a>.
<h3>4.3.3 <a name="uri">URLs and URIs</a></h3>
<p>This section has been replaced by <cite>CSS Values and Units Module
Level 3</cite> <a href="refs.html#ref-CSS3VAL" rel="biblioentry" class="noxref"><span class="normref">[CSS3VAL]</span></a>.
<h3>4.3.4 <a name="counter">Counters</a></h3>
<p><span class="index-def" title="<counter>, definition of"><a
name="value-def-counter">Counters</a></span> are denoted by
case-sensitive identifiers (see the <a href="generate.html#propdef-counter-increment" class="noxref"><span
class="propinst-counter-increment">'counter-increment'</span></a> and
<a href="generate.html#propdef-counter-reset" class="noxref"><span class="propinst-counter-reset">'counter-reset'</span></a>
properties). To refer to the value of a counter, the notation
<a name="x2"><span class="index-def" title="counter()">
'counter(<identifier>)'</span></a> or 'counter(<identifier>,
<'list-style-type'>)', with optional white space separating the tokens,
is used. The default style is 'decimal'.
</p>
<p>To refer to a sequence of nested counters of the same name, the
notation is 'counters(<identifier>, <string>)' or
'counters(<identifier>, <string>, <'list-style-type'>)'
with optional white space separating the tokens.
</p>
<p>See <a href="generate.html#scope">"Nested counters and scope"</a>
in the chapter on <a href="generate.html">generated content</a> for
how user agents must determine the value or values of the counter. See
the definition of counter values of the <a href="generate.html#propdef-content" class="noxref"><span
class="propinst-content">'content'</span></a> property for how it must
convert these values to a string.
</p>
<p>In CSS 2.2, the values of counters can
only be referred to from the <a href="generate.html#propdef-content" class="noxref"><span
class="propinst-content">'content'</span></a> property. Note that 'none'
is a possible <'list-style-type'>: 'counter(x,
none)' yields an empty string.
</p>
<div class="example"><P style="display:none">Example(s):</P>
<p>Here is a style sheet that numbers paragraphs (p) for each chapter
(h1). The paragraphs are numbered with roman numerals, followed by a
period and a space:
</p>
<pre>
p {counter-increment: par-num}
h1 {counter-reset: par-num}
p:before {content: counter(par-num, upper-roman) ". "}
</pre>
</div>
<h3>4.3.5 <a name="color-units">Colors</a></h3>
<p>This section has been replaced by <cite>CSS Color Module
Level 3</cite> <a href="refs.html#ref-CSS3COLOR" rel="biblioentry" class="noxref"><span class="normref">[CSS3COLOR]</span></a>.
<h3>4.3.6 <a name="strings">Strings</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.3.7 <a name="unsupported-values">Unsupported Values</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h2>4.4 <a name="charset">CSS style sheet representation</a></h2>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<h3>4.4.1 <a name="escaping">Referring to characters not represented in a character encoding</a></h3>
<p>This section has been replaced by <cite>CSS Syntax Module
Level 3</cite> <a href="refs.html#ref-CSS3SYN" rel="biblioentry" class="noxref"><span class="normref">[CSS3SYN]</span></a>.
<hr class="navbar">
<div class="navbar">
<p><a href="conform.html">previous</a>
<a href="selector.html">next</a>
<a href="Overview.html#minitoc">contents</a>
<a href="propidx.html">properties</a>
<a href="indexlist.html">index</a>
</div>
</body>
</html>