~ubuntu-branches/ubuntu/oneiric/w3-recs/oneiric

« back to all changes in this revision

Viewing changes to www.w3.org/TR/2009/CR-CSS2-20090423/grammar.html

  • Committer: Bazaar Package Importer
  • Author(s): Colin Darie, Stefano Zacchiroli, Colin Darie
  • Date: 2011-01-07 17:15:16 UTC
  • mfrom: (1.1.4 upstream) (1.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110107171516-klmadnjiktybzswf
Tags: 20110107-1
[ Stefano Zacchiroli ]
* debian/TODO.Debian: add pending TODO items

[ Colin Darie ]
* New maintainer. (Closes: #579786)
* List of recommendations (REC) changes (Closes: #604968):
  - Associating Style Sheets with XML documents 1.0 (Second Edition)
    (updated 28/10/2010)
  - Device Description Repository Simple API (new 05/12/2008)
  - EMMA: Extensible MultiModal Annotation markup language
    (new 10/02/2009)
  - Element Traversal Specification (new 22/12/2008)
  - Extensible Markup Language (XML) 1.0 (Fifth Edition)
    (updated 26/11/2008)
  - Mobile Web Best Practices 1.0 (new 29/07/2008)
  - Namespaces in XML 1.0 (Third Edition) (updated 08/12/2009)
  - OWL 2 Web Ontology Language Conformance (new 27/10/2009)
  - OWL 2 Web Ontology Language Direct Semantics (new 27/10/2009)
  - OWL 2 Web Ontology Language Document Overview (new 27/10/2009)
  - OWL 2 Web Ontology Language Mapping to RDF Graphs (new 27/10/2009)
  - OWL 2 Web Ontology Language New Features and Rationale
    (new 27/10/2009)
  - OWL 2 Web Ontology Language Primer (new 27/10/2009)
  - OWL 2 Web Ontology Language Profiles (new 27/10/2009)
  - OWL 2 Web Ontology Language Quick Reference Guide (new 27/10/2009)
  - OWL 2 Web Ontology Language RDF-Based Semantics (new 27/10/2009)
  - OWL 2 Web Ontology Language Structural Specification and
    Functional-Style Syntax (new 27/10/2009)
  - OWL 2 Web Ontology Language XML Serialization (new 27/10/2009)
  - Pronunciation Lexicon Specification (PLS) Version 1.0
    (new 14/10/2008)
  - Protocol for Web Description Resources (POWDER): Description Resources
    (new 01/09/2009)
  - Protocol for Web Description Resources (POWDER): Formal Semantics
    (new 01/09/2009)
  - Protocol for Web Description Resources (POWDER): Grouping of Resources
    (new 01/09/2009)
  - RDFa in XHTML: Syntax and Processing (new 14/10/2008)
  - RIF Basic Logic Dialect (new 22/06/2010)
  - RIF Core Dialect (new 22/06/2010)
  - RIF Datatypes and Built-Ins 1.0 (new 22/06/2010)
  - RIF Framework for Logic Dialects (new 22/06/2010)
  - RIF Production Rule Dialect (new 22/06/2010)
  - RIF RDF and OWL Compatibility (new 22/06/2010)
  - SKOS Simple Knowledge Organization System Reference (new 18/08/2009)
  - Scalable Vector Graphics (SVG) Tiny 1.2 Specification
    (new 22/12/2008)
  - Service Modeling Language Interchange Format Version 1.1
    (new 12/05/2009)
  - Service Modeling Language, Version 1.1 (new 12/05/2009)
  - Speech Syn8hesis Markup Language (SSML) Version 1.1 (new 07/09/2010)
  - Synchronized Multimedia Integration Language (SMIL 3.0)
    (updated 01/12/2008)
  - W3C mobileOK Basic Tests 1.0 (new 08/12/2008)
  - Web Content Accessibility Guidelines (WCAG) 2.0 (new 11/12/2008)
  - Web Security Context: User Interface Guidelines (new 12/08/2010)
  - WebCGM 2.1 (new 01/03/2010)
  - XForms 1.1 (updated 20/10/2009)
  - XHTML-Print - Second Edition (new 23/11/2010)
  - XHTML™ 1.1 - Module-based XHTML (updated 07/10/2010)
  - XHTML™ Basic 1.1 - Second Edition (updated 07/10/2010)
  - XHTML™ Modularization 1.1 - Second Edition (new 29/07/2010)
  - XML Base (Second Edition) (updated 28/01/2009)
  - XML Entity Definitions for Characters (new 01/04/2010)
  - XML Linking Language (XLink) Version 1.1 (new 06/05/2010)
  - XML Path Language (XPath) 2.0 (Second Edition) (new 14/12/2010)
  - XML Syntax for XQuery 1.0 (XQueryX) (Second Edition) (new 14/12/2010)
  - XProc: An XML Pipeline Language (new 11/05/2010)
  - XQuery 1.0 and XPath 2.0 Data Model (XDM) (Second Edition)
    (updated 14/12/2010)
  - XQuery 1.0 and XPath 2.0 Formal Semantics (Second Edition)
    (updated 14/12/2010)
  - XQuery 1.0 and XPath 2.0 Functions and Operators (Second Edition)
    (updated 14/12/2010)
  - XQuery 1.0: An XML Query Language (Second Edition) (new 14/12/2010)
  - XSLT 2.0 and XQuery 1.0 Serialization (Second Edition)
    (updated 14/12/2010)
  - rdf:PlainLiteral: A Datatype for RDF Plain Literals (new 27/10/2009)
* From now, this package include PR and CR: added a NEWS entry about it
* List of PR and CR changes (some of them were previously included as REC):
  - A MathML for CSS Profile (new PR 10/08/2010)
  - CSS Color Module Level 3 (new PR 28/10/2010)
  - CSS Marquee Module Level 3 (new CR 05/12/2008)
  - CSS Mobile Profile 2.0 (new CR 10/12/2008)
  - CSS Multi-column Layout Module (new CR 17/12/2009)
  - CSS Namespaces Module (new CR 23/05/2008)
  - CSS Style Attributes (new CR 12/10/2010)
  - CSS TV Profile 1.0 (new CR 14/05/2003)
  - CSS3 Basic User Interface Module (new CR 11/05/2004)
  - CSS3 Ruby Module (new CR 14/05/2003)
  - Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification
    (updated CR 23/04/2009)
  - Character Model for the World Wide Web 1.0: Resource Identifiers
    (new CR 22/11/2004)
  - Digital Signatures for Widgets (new CR 24/06/2010)
  - Efficient XML Interchange (EXI) Format 1.0 (new CR 08/12/2009)
  - Geolocation API Specification (new CR 07/09/2010)
  - Mathematical Markup Language (MathML) Version 3.0 (new PR 10/08/2010)
  - Media Queries (new CR 27/07/2010)
  - Mobile Web Application Best Practices (new PR 21/10/2010)
  - Selectors API Level 1 (new CR 22/12/2009)
  - Selectors Level 3 (new PR 15/12/2009)
  - The 'view-mode' Media Feature (new CR 24/06/2010)
  - Timed Text Markup Language (TTML) 1.0 (new PR 14/09/2010)
  - Voice Browser Call Control: CCXML Version 1.0 (new CR 01/04/2010)
  - W3C XML Schema Definition Language (XSD): Component Designators
    (new CR 19/01/2010)
  - Web Services Choreography Description Language Version 1.0
    (new CR 09/11/2005)
  - Widget Access Request Policy (new CR 20/04/2010)
  - XForms 1.0 Basic Profile (new CR 14/10/2003)
  - XML Binding Language (XBL) 2.0 (new CR 16/03/2007)
  - XML Fragment Interchange (new CR 12/02/2001)
  - XMLHttpRequest (new CR 03/08/2010)
  - XQuery Update Facility 1.0 (new CR 09/06/2009)
  - XQuery Update Facility 1.0 Requirements (new CR 14/03/2008)
  - XQuery Update Facility 1.0 Use Cases (new CR 14/03/2008)
  - XQuery and XPath Full Text 1.0 (new CR 28/01/2010)
* Bump Standard-Version to 3.9.1 (no changes required)
* debian/control.in
  - Converting repo from svn to git: update Vcs-* fields accordingly
  - Added Depends: ${misc:Depends} as recommended by debhelper
* debian/rules:
  - Redirect output of wget to a logfile
  - Ignore .jar extension
  - Exclude a javadoc/ directory: this would break the doc-base process
  - Added a fix-paths target because of broken links in the tr.rdf
  - Ignore error status returned by wget because of broken links,
    so the download target can be fully completed
  - wrap lines > 80 char in control-index.txt copied in debian/control to
    avoid lintian warnings
* Patches:
  - Switch to 3.0 (quilt) source format
  - Drop rec-dom2-html-url patch, no longer necessary
  - Add fix-link-REC-PICS-labels-961031.patch
  - Convert (and update) css-local-images.patch
* Clean up TODO.Debian
* debian/README.source: explicit the steps to build the package from git
* Added unapply-patches to debian/source/local-options

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 
2
<html lang="en">
 
3
 
 
4
<HEAD>
 
5
<TITLE>Grammar of CSS&nbsp;2.1</TITLE>
 
6
<link rel="stylesheet" href="style/default.css" type="text/css">
 
7
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-CR.css" type="text/css">
 
8
<link rel="prev" href="propidx.html">
 
9
<link rel="next" href="leftblank.html">
 
10
<link rel="contents" href="cover.html#minitoc">
 
11
<link rel="CSS-properties" href="propidx.html" title="properties">
 
12
<link rel="index" href="indexlist.html" title="index">
 
13
<link rel="first" href="cover.html">
 
14
</HEAD>
 
15
<BODY>
 
16
<div class="navbar">
 
17
<p><a href="propidx.html">previous</a> &nbsp;
 
18
<a href="leftblank.html">next</a> &nbsp;
 
19
<a href="cover.html#minitoc">contents</a> &nbsp;
 
20
<a href="propidx.html">properties</a> &nbsp;
 
21
<a href="indexlist.html">index</a> &nbsp;
 
22
</div>
 
23
<hr class="navbar">
 
24
 
 
25
<H1><a name="q0">Appendix G. Grammar of CSS&nbsp;2.1</a></H1>
 
26
<div class="subtoc">
 
27
<p><strong>Contents</strong>
 
28
  <ul class="toc">
 
29
    <li class="tocline2"><a href="grammar.html#grammar" class="tocxref">G.1 Grammar</a>
 
30
    <li class="tocline2"><a href="grammar.html#scanner" class="tocxref">G.2 Lexical scanner</a>
 
31
    <li class="tocline2"><a href="grammar.html#tokenizer-diffs" class="tocxref">G.3 Comparison of tokenization in CSS&nbsp;2.1 and CSS1</a>
 
32
  </ul>
 
33
</div>
 
34
 
 
35
<P>The grammar below defines the syntax of CSS&nbsp;2.1. It is in some sense,
 
36
however, a superset of CSS&nbsp;2.1 as this specification imposes additional
 
37
semantic constraints not expressed in this grammar. A conforming UA
 
38
must also adhere to the <a href="syndata.html#syntax">
 
39
forward-compatible parsing rules</a>, the selectors notation, the <a
 
40
href="about.html#property-defs">property and value notation</a>,
 
41
and the unit notation. However, not all syntactically correct CSS can take
 
42
effect, since the document language may impose restrictions that are
 
43
not in CSS, e.g., HTML imposes restrictions on the possible values of
 
44
the "class" attribute.
 
45
 
 
46
<h2>G.1 <a name="grammar">Grammar</a></h2>
 
47
 
 
48
<P> The grammar below is <a name="x0"><span class="index-inst"
 
49
title="LALR(1)">LALR(1)</span></a> (but note that most UA's should not use it
 
50
directly, since it doesn't express the <a
 
51
href="syndata.html#parsing-errors">parsing conventions</a>, only the
 
52
CSS&nbsp;2.1 syntax). The format of the productions is optimized for human
 
53
consumption and some shorthand notation beyond Yacc (see <a href="refs.html#ref-YACC" rel="biblioentry" class="noxref"><span class="normref">[YACC]</span></a>) is
 
54
used:</P>
 
55
 
 
56
<ul>
 
57
<li><strong>*</strong>: 0 or more
 
58
<li><strong>+</strong>: 1 or more
 
59
<li><strong>?</strong>: 0 or 1 
 
60
<li><strong>|</strong>: separates alternatives 
 
61
<li><strong>[&nbsp;]</strong>: grouping
 
62
</ul>
 
63
 
 
64
<p>The productions are:
 
65
 
 
66
<pre>
 
67
stylesheet
 
68
  : [ CHARSET_SYM STRING ';' ]?
 
69
    [S|CDO|CDC]* [ import [ [CDO|CDC] [S|CDO|CDC] ]* ]*
 
70
    [ [ ruleset | media | page ] [ [CDO|CDC] [S|CDO|CDC] ]* ]*
 
71
  ;
 
72
import
 
73
  : IMPORT_SYM S*
 
74
    [STRING|URI] S* [ medium [ COMMA S* medium]* ]? ';' S*
 
75
  ;
 
76
media
 
77
  : MEDIA_SYM S* medium [ COMMA S* medium ]* LBRACE S* ruleset* '}' S*
 
78
  ;
 
79
medium
 
80
  : IDENT S*
 
81
  ;
 
82
page
 
83
  : PAGE_SYM S* pseudo_page?
 
84
    LBRACE S* declaration? [ ';' S* declaration? ]* '}' S*
 
85
  ;
 
86
pseudo_page
 
87
  : ':' IDENT S*
 
88
  ;
 
89
operator
 
90
  : '/' S* | COMMA S*
 
91
  ;
 
92
combinator
 
93
  : PLUS S*
 
94
  | GREATER S*
 
95
  | S+
 
96
  ;
 
97
unary_operator
 
98
  : '-' | PLUS
 
99
  ;
 
100
property
 
101
  : IDENT S*
 
102
  ;
 
103
ruleset
 
104
  : selector [ COMMA S* selector ]*
 
105
    LBRACE S* declaration? [ ';' S* declaration? ]* '}' S*
 
106
  ;
 
107
<a name="x1"><span class="index-inst" title="selector">selector</span></a>
 
108
  : simple_selector [ combinator simple_selector ]*
 
109
  ;
 
110
simple_selector
 
111
  : element_name [ HASH | class | attrib | pseudo ]*
 
112
  | [ HASH | class | attrib | pseudo ]+
 
113
  ;
 
114
class
 
115
  : '.' IDENT
 
116
  ;
 
117
element_name
 
118
  : IDENT | '*'
 
119
  ;
 
120
attrib
 
121
  : '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S*
 
122
    [ IDENT | STRING ] S* ]? ']'
 
123
  ;
 
124
pseudo
 
125
  : ':' [ IDENT | FUNCTION S* [IDENT S*]? ')' ]
 
126
  ;
 
127
declaration
 
128
  : property ':' S* expr prio?
 
129
  ;
 
130
prio
 
131
  : IMPORTANT_SYM S*
 
132
  ;
 
133
expr
 
134
  : term [ operator? term ]*
 
135
  ;
 
136
term
 
137
  : unary_operator?
 
138
    [ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* |
 
139
      TIME S* | FREQ S* ]
 
140
  | STRING S* | IDENT S* | URI S* | hexcolor | function
 
141
  ;
 
142
function
 
143
  : FUNCTION S* expr ')' S*
 
144
  ;
 
145
/*
 
146
 * There is a constraint on the <a name="x2"><span class="index-inst" title="color">color</span></a> that it must
 
147
 * have either 3 or 6 hex-digits (i.e., [0-9a-fA-F])
 
148
 * after the "#"; e.g., "#000" is OK, but "#abcd" is not.
 
149
 */
 
150
hexcolor
 
151
  : HASH S*
 
152
  ;
 
153
</pre>
 
154
 
 
155
<h2>G.2 <a name="scanner">Lexical scanner</a></h2>
 
156
 
 
157
<p> The following is the <a name="x3"><span class="index-def"
 
158
title="tokenizer">tokenizer</span></a>, written in Flex (see <a href="refs.html#ref-FLEX" rel="biblioentry" class="noxref"><span class="normref">[FLEX]</span></a>)
 
159
notation. The tokenizer is case-insensitive.
 
160
 
 
161
<p>The "\377" represents the highest character
 
162
number that current versions of Flex can deal with (decimal 255). It
 
163
should be read as "\4177777" (decimal 1114111), which is the highest
 
164
possible code point in <a name="x4"><span class="index-inst"
 
165
title="unicode">Unicode</span></a>/<a name="x5"><span class="index-inst"
 
166
title="iso-10646">ISO-10646</span></a>.
 
167
 
 
168
<pre>
 
169
%option case-insensitive
 
170
 
 
171
h               [0-9a-f]
 
172
nonascii        [\200-\377]
 
173
unicode         \\{h}{1,6}(\r\n|[ \t\r\n\f])?
 
174
escape          {unicode}|\\[^\r\n\f0-9a-f]
 
175
nmstart         [_a-z]|{nonascii}|{escape}
 
176
nmchar          [_a-z0-9-]|{nonascii}|{escape}
 
177
string1         \"([^\n\r\f\\"]|\\{nl}|{escape})*\"
 
178
string2         \'([^\n\r\f\\']|\\{nl}|{escape})*\'
 
179
invalid1        \"([^\n\r\f\\"]|\\{nl}|{escape})*
 
180
invalid2        \'([^\n\r\f\\']|\\{nl}|{escape})*
 
181
 
 
182
comment         \/\*[^*]*\*+([^/*][^*]*\*+)*\/
 
183
ident           -?{nmstart}{nmchar}*
 
184
name            {nmchar}+
 
185
num             [0-9]+|[0-9]*"."[0-9]+
 
186
string          {string1}|{string2}
 
187
invalid         {invalid1}|{invalid2}
 
188
url             ([!#$%&amp;*-~]|{nonascii}|{escape})*
 
189
s               [ \t\r\n\f]+
 
190
w               {s}?
 
191
nl              \n|\r\n|\r|\f
 
192
 
 
193
A               a|\\0{0,4}(41|61)(\r\n|[ \t\r\n\f])?
 
194
C               c|\\0{0,4}(43|63)(\r\n|[ \t\r\n\f])?
 
195
D               d|\\0{0,4}(44|64)(\r\n|[ \t\r\n\f])?
 
196
E               e|\\0{0,4}(45|65)(\r\n|[ \t\r\n\f])?
 
197
G               g|\\0{0,4}(47|67)(\r\n|[ \t\r\n\f])?|\\g
 
198
H               h|\\0{0,4}(48|68)(\r\n|[ \t\r\n\f])?|\\h
 
199
I               i|\\0{0,4}(49|69)(\r\n|[ \t\r\n\f])?|\\i
 
200
K               k|\\0{0,4}(4b|6b)(\r\n|[ \t\r\n\f])?|\\k
 
201
L               l|\\0{0,4}(4c|6c)(\r\n|[ \t\r\n\f])?|\\l
 
202
M               m|\\0{0,4}(4d|6d)(\r\n|[ \t\r\n\f])?|\\m
 
203
N               n|\\0{0,4}(4e|6e)(\r\n|[ \t\r\n\f])?|\\n
 
204
O               o|\\0{0,4}(4f|6f)(\r\n|[ \t\r\n\f])?|\\o
 
205
P               p|\\0{0,4}(50|70)(\r\n|[ \t\r\n\f])?|\\p
 
206
R               r|\\0{0,4}(52|72)(\r\n|[ \t\r\n\f])?|\\r
 
207
S               s|\\0{0,4}(53|73)(\r\n|[ \t\r\n\f])?|\\s
 
208
T               t|\\0{0,4}(54|74)(\r\n|[ \t\r\n\f])?|\\t
 
209
U               u|\\0{0,4}(55|75)(\r\n|[ \t\r\n\f])?|\\u
 
210
X               x|\\0{0,4}(58|78)(\r\n|[ \t\r\n\f])?|\\x
 
211
Z               z|\\0{0,4}(5a|7a)(\r\n|[ \t\r\n\f])?|\\z
 
212
 
 
213
%%
 
214
 
 
215
{s}                     {return S;}
 
216
 
 
217
\/\*[^*]*\*+([^/*][^*]*\*+)*\/          /* ignore comments */
 
218
 
 
219
"&lt;!--"               {return CDO;}
 
220
"-->"                   {return CDC;}
 
221
"~="                    {return INCLUDES;}
 
222
"|="                    {return DASHMATCH;}
 
223
 
 
224
{w}"{"                  {return LBRACE;}
 
225
{w}"+"                  {return PLUS;}
 
226
{w}">"                  {return GREATER;}
 
227
{w}","                  {return COMMA;}
 
228
 
 
229
{string}                {return STRING;}
 
230
{invalid}               {return INVALID; /* unclosed string */}
 
231
 
 
232
{ident}                 {return IDENT;}
 
233
 
 
234
"#"{name}               {return HASH;}
 
235
 
 
236
@{I}{M}{P}{O}{R}{T}     {return IMPORT_SYM;}
 
237
@{P}{A}{G}{E}           {return PAGE_SYM;}
 
238
@{M}{E}{D}{I}{A}        {return MEDIA_SYM;}
 
239
"@charset "             {return CHARSET_SYM;}
 
240
 
 
241
"!"({w}|{comment})*{I}{M}{P}{O}{R}{T}{A}{N}{T}  {return IMPORTANT_SYM;}
 
242
 
 
243
{num}{E}{M}             {return EMS;}
 
244
{num}{E}{X}             {return EXS;}
 
245
{num}{P}{X}             {return LENGTH;}
 
246
{num}{C}{M}             {return LENGTH;}
 
247
{num}{M}{M}             {return LENGTH;}
 
248
{num}{I}{N}             {return LENGTH;}
 
249
{num}{P}{T}             {return LENGTH;}
 
250
{num}{P}{C}             {return LENGTH;}
 
251
{num}{D}{E}{G}          {return ANGLE;}
 
252
{num}{R}{A}{D}          {return ANGLE;}
 
253
{num}{G}{R}{A}{D}       {return ANGLE;}
 
254
{num}{M}{S}             {return TIME;}
 
255
{num}{S}                {return TIME;}
 
256
{num}{H}{Z}             {return FREQ;}
 
257
{num}{K}{H}{Z}          {return FREQ;}
 
258
{num}{ident}            {return DIMENSION;}
 
259
 
 
260
{num}%                  {return PERCENTAGE;}
 
261
{num}                   {return NUMBER;}
 
262
 
 
263
{U}{R}{L}"("{w}{string}{w}")"   {return URI;}
 
264
{U}{R}{L}"("{w}{url}{w}")"      {return URI;}
 
265
 
 
266
{ident}"("              {return FUNCTION;}
 
267
 
 
268
.                       {return *yytext;}
 
269
</pre>
 
270
 
 
271
<h2>G.3 <a name="tokenizer-diffs">Comparison of tokenization in CSS&nbsp;2.1 and
 
272
CSS1</a></h2>
 
273
 
 
274
<p>There are some differences in the syntax specified in the CSS1
 
275
recommendation (<a href="refs.html#ref-CSS1" rel="biblioentry" class="noxref"><span class="informref">[CSS1]</span></a>), and the one above. Most of these are due
 
276
to new tokens in CSS2 that didn't exist in CSS1. Others are because
 
277
the grammar has been rewritten to be more readable. However, there are
 
278
some incompatible changes, that were felt to be errors in the CSS1
 
279
syntax. They are explained below.
 
280
 
 
281
<ul>
 
282
<li>CSS1 style sheets could only be in 1-byte-per-character
 
283
encodings, such as ASCII and ISO-8859-1. CSS&nbsp;2.1 has no such
 
284
limitation. In practice, there was little difficulty in extrapolating
 
285
the CSS1 tokenizer, and some UAs have accepted 2-byte encodings.
 
286
 
 
287
<li>CSS1 only allowed four hex-digits after the backslash (\) to refer
 
288
to Unicode characters, CSS2 <a
 
289
href="syndata.html#escaped-characters">allows six</a>. Furthermore,
 
290
CSS2 allows a white space character to delimit the escape
 
291
sequence. E.g., according to CSS1, the string "\abcdef" has 3 letters
 
292
(\abcd, e, and f), according to CSS2 it has only one (\abcdef).
 
293
 
 
294
<li>The tab character (ASCII 9) was not allowed in strings. However,
 
295
since strings in CSS1 were only used for font names and for URLs, the
 
296
only way this can lead to incompatibility between CSS1 and CSS2 is if
 
297
a style sheet contains a font family that has a tab in its name.
 
298
 
 
299
<li>Similarly, newlines (<a href="syndata.html#strings">escaped with a
 
300
backslash</a>) were not allowed in strings in CSS1.
 
301
 
 
302
<li>CSS2 parses a number immediately followed by an identifier as a
 
303
DIMENSION token (i.e., an unknown unit), CSS1 parsed it as a number and an
 
304
identifier. That means that in CSS1, the declaration 'font:
 
305
10pt/1.2serif' was correct, as was 'font: 10pt/12pt serif'; in CSS2, a
 
306
space is required before "serif". (Some UAs accepted the first
 
307
example, but not the second.)
 
308
 
 
309
<li>In CSS1, a class name could start with a digit (".55ft"), unless
 
310
it was a dimension (".55in"). In CSS2, such classes are parsed as
 
311
unknown dimensions (to allow for future additions of new units). To
 
312
make ".55ft" a valid class, CSS2 requires the first digit to be
 
313
escaped (".\35 5ft")
 
314
</ul>
 
315
 
 
316
 
 
317
<hr class="navbar">
 
318
 
 
319
<div class="navbar">
 
320
<p><a href="propidx.html">previous</a> &nbsp;
 
321
<a href="leftblank.html">next</a> &nbsp;
 
322
<a href="cover.html#minitoc">contents</a> &nbsp;
 
323
<a href="propidx.html">properties</a> &nbsp;
 
324
<a href="indexlist.html">index</a> &nbsp;
 
325
</div>
 
326
</body>
 
327
</html>
 
328