15
15
16
16
< h1 > CSS Styling Attribute Syntax Level 1</ h1 >
17
17
18
- < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 7 January 2010</ h2 >
18
+ < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 14 January
19
+ 2010</ h2 >
19
20
20
21
< dl >
21
22
< dt > This version:</ dt >
22
- <!-- <dd><dd><a href="http://www.w3.org/TR/2010/WD-css-style-attr-20100107 /">http://www.w3.org/TR/2010/WD-css-style-attr-20100107 /</a></dd> -->
23
+ <!-- <dd><dd><a href="http://www.w3.org/TR/2010/WD-css-style-attr-20100114 /">http://www.w3.org/TR/2010/WD-css-style-attr-20100114 /</a></dd> -->
23
24
24
25
< dd > < a
25
26
href ="http://dev.w3.org/csswg/css-style-attr/ "> http://dev.w3.org/csswg/css-style-attr/</ a >
@@ -129,14 +130,12 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
129
130
130
131
< li > < a href ="#syntax "> < span class =secno > 3. </ span > Syntax and Parsing</ a >
131
132
132
- < li > < a href ="#grammar "> < span class =secno > 4. </ span > Grammar</ a >
133
-
134
- < li > < a href ="#interpret "> < span class =secno > 5. </ span > Cascading and
133
+ < li > < a href ="#interpret "> < span class =secno > 4. </ span > Cascading and
135
134
Interpretation</ a >
136
135
137
- < li > < a href ="#ack "> < span class =secno > 6 . </ span > Acknowledgments</ a >
136
+ < li > < a href ="#ack "> < span class =secno > 5 . </ span > Acknowledgments</ a >
138
137
139
- < li > < a href ="#references "> < span class =secno > 7 . </ span > References </ a >
138
+ < li > < a href ="#references "> < span class =secno > 6 . </ span > References </ a >
140
139
< ul class =toc >
141
140
< li class =no-num > < a href ="#normative-references "> Normative
142
141
references</ a >
@@ -154,7 +153,7 @@ <h2 id=intro><span class=secno>1. </span>Introduction</h2>
154
153
to specific elements in documents. If a document format defines a styling
155
154
attribute and the attribute accepts CSS as its value, then this
156
155
specification defines this < dfn id =css-styling-attribute > CSS styling
157
- attribute</ dfn > ‘ < code class = css > s syntax and interpretation. </ code >
156
+ attribute</ dfn > ’ s syntax and interpretation.
158
157
159
158
< div class =example >
160
159
< p > The following example shows the use of the < code > style</ code > attribute
@@ -217,40 +216,32 @@ <h2 id=syntax><span class=secno>3. </span>Syntax and Parsing</h2>
217
216
< p > The value of the styling attribute must match the syntax of the contents
218
217
of a CSS < a
219
218
href ="http://www.w3.org/TR/CSS21/syndata.html#rule-sets "> declaration
220
- block</ a > . The interpreter must parse the styling attribute’s value
221
- using the same forward-compatible parsing rules that apply to parsing
222
- declaration block contents in a normal CSS style sheet. See < a
219
+ block</ a > , whose formal grammar is given below in terms of the < a
220
+ href ="http://www.w3.org/TR/CSS21/syndata.html#syntax "> CSS core
221
+ grammar</ a > :
222
+
223
+ < pre >
224
+ declaration-list
225
+ : S* declaration [ ';' S* declaration ]*
226
+ ;
227
+ </ pre >
228
+
229
+ < p class =note > Note that following the CSS2.1 convention, comment tokens are
230
+ not shown in the rule above.
231
+
232
+ < p > The interpreter must parse the styling attribute's value using the same
233
+ forward-compatible parsing rules that apply to parsing declaration block
234
+ contents in a normal CSS style sheet. See < a
223
235
href ="http://www.w3.org/TR/CSS21/syndata.html "> chapter 4 of the CSS2.1
224
- specification</ a > . < a href ="#CSS21 "
236
+ specification</ a > for details . < a href ="#CSS21 "
225
237
rel =biblioentry > [CSS21]<!--{{!CSS21}}--> </ a >
226
238
227
239
< p class =note > Note that because there is no open brace delimiting the
228
240
declaration list in the CSS styling attribute syntax, a close brace
229
241
(< code > }</ code > ) in the styling attribute's value does not terminate the
230
242
style data: it is merely an invalid token.
231
243
232
- < h2 id =grammar > < span class =secno > 4. </ span > Grammar</ h2 >
233
-
234
- < p > The syntax of the CSS fragment that is allowed as the CSS styling
235
- attribute's value is formally specified as follows:
236
-
237
- < pre >
238
- inline-stylesheet
239
- : S* declaration-list
240
- ;
241
-
242
- declaration-list
243
- : declaration [ ';' S* declaration ]*
244
- ;
245
- </ pre >
246
-
247
- < p > Please refer to the grammar in < a
248
- href ="http://www.w3.org/TR/CSS21/grammar.html "> appendix D of the CSS2.1
249
- specification</ a > < a href ="#CSS21 "
250
- rel =biblioentry > [CSS21]<!--{{!CSS21}}--> </ a > for the definition of the
251
- symbols not defined here.
252
-
253
- < h2 id =interpret > < span class =secno > 5. </ span > Cascading and Interpretation</ h2 >
244
+ < h2 id =interpret > < span class =secno > 4. </ span > Cascading and Interpretation</ h2 >
254
245
255
246
< p > The declarations in a styling attribute apply to the element to which
256
247
the attribute belongs. CSS2.1 < a
@@ -273,12 +264,12 @@ <h2 id=interpret><span class=secno>5. </span>Cascading and Interpretation</h2>
273
264
independently and treated as a separate style rule, the ordering of which
274
265
should be defined by the document language, else is undefined.
275
266
276
- < h2 id =ack > < span class =secno > 6 . </ span > Acknowledgments</ h2 >
267
+ < h2 id =ack > < span class =secno > 5 . </ span > Acknowledgments</ h2 >
277
268
278
269
< p > Thanks to feedback from Daniel Glazman, Ian Hickson, Eric A. Meyer,
279
270
Björn Höhrmann.
280
271
281
- < h2 id =references > < span class =secno > 7 . </ span > References</ h2 >
272
+ < h2 id =references > < span class =secno > 6 . </ span > References</ h2 >
282
273
283
274
< h3 class =no-num id =normative-references > Normative references</ h3 >
284
275
<!--begin-normative-->
0 commit comments