Skip to content

Commit 5a0a1f0

Browse files
committed
[css2] CSS 2.1 issues.
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402293
1 parent 16404ba commit 5a0a1f0

8 files changed

Lines changed: 177 additions & 94 deletions

File tree

css2/colors.src

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: colors.src,v 2.39 2004-02-16 18:33:43 bbos Exp $ -->
3+
<!-- $Id: colors.src,v 2.40 2005-04-12 14:02:15 bbos Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<title>Colors and backgrounds</title>
@@ -66,14 +66,16 @@ The background of the root element becomes the background of the canvas and cove
6666
</p>
6767

6868
<p>For HTML documents, however, we recommend that authors specify the
69-
background for the BODY element rather than the HTML element. User
70-
agents should observe the following precedence rules to fill in the
71-
background of the canvas of HTML documents:
72-
if the value of the <span class="propinst-background">'background'</span> property for the HTML
73-
element is different from 'transparent' then use it, else use the
74-
value of the <span class="propinst-background">'background'</span>
75-
property for the BODY element. If the resulting value is
76-
'transparent', the rendering is undefined. This does not apply to XHTML documents.
69+
background for the BODY element rather than the HTML element.
70+
For HTML documents whose root HTML element has computed values of
71+
'transparent' for <span
72+
class="propinst-background-color">'background-color'</span> and 'none'
73+
for <span class="propinst-background-image">'background-image'</span>,
74+
user agents must instead use the computed value of those properties
75+
from that HTML element's first BODY element child when painting
76+
backgrounds for the canvas, and must not paint a background for that
77+
BODY element.
78+
This does not apply to XHTML documents.
7779
</p>
7880
<div class="html-example"><p>
7981
According to these rules, the canvas underlying the following

css2/conform.src

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: conform.src,v 2.61 2005-03-22 14:31:04 bbos Exp $ -->
3+
<!-- $Id: conform.src,v 2.62 2005-04-12 14:02:15 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Conformance: requirements and recommendations</TITLE>
@@ -108,10 +108,23 @@ how the elements should be rendered.
108108
<a name="replaced-element">Replaced
109109
element</a></span></strong>
110110

111-
<dd>An element for which the CSS formatter knows only the intrinsic
112-
dimensions. In HTML, IMG and OBJECT elements can be replaced elements.
113-
For example, the content of the IMG element is often replaced by the
114-
image that the "src" attribute designates.
111+
<dd><p>An element that is outside the scope of the CSS formatter, such
112+
as an image, embedded document, or applet. For example, the content of
113+
the HTML IMG element is often replaced by the image that its "src"
114+
attribute designates. Replaced elements often have intrinsic
115+
dimensions: an intrinsic width, an intrinsic height, and an intrinsic
116+
ratio. For example, a bitmap image has an intrinsic width and an
117+
intrinsic height specified in absolute units (from which the intrinsic
118+
ratio can obviously be determined). On the other hand, other documents
119+
may not have any intrinsic dimensions (for example a blank HTML
120+
document).
121+
122+
<p>User agents may consider a replaced element to not have any
123+
intrinsic dimensions if it is believed that those dimensions could
124+
leak sensitive information to a third party. For example, if an HTML
125+
document changed intrinsic size depending on the user's bank balance,
126+
then the UA might want to act as if that resource had no intrinsic
127+
dimensions.
115128

116129
<dt><strong><span class="index-def" title="intrinsic
117130
dimensions"><a name="intrinsic">Intrinsic dimensions</a></span></strong>
@@ -323,10 +336,6 @@ href="cascade.html">cascading and inheritance</a>.
323336
with the "alternate" keyword in HTML 4.0 [[-HTML40]]), the UA must
324337
allow the user to select which style sheet set the UA should apply.
325338

326-
<li>User agents must give the user the ability to turn off the
327-
influence of specific author style sheets. Conformance to UAAG 1.0
328-
checkpoint 4.14 satisfies this condition [[-UUAG]].
329-
330339
<li>The UA must allow the user to turn off the influence of author style sheets.
331340

332341
</ol>

css2/cover.src

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ in this specification.</p>
240240
algorithm for tables is restricted to (1) the containing block width
241241
and (2) the content and properties of the table and its
242242
children. This restriction may be lifted.
243+
<dt>Quotes
244+
<dd>
245+
<p>The <span class="propinst-quotes">'quotes'</span> property and the
246+
'open-quote', 'close-quote', 'no-open-quote' and 'no-close-quote'
247+
keywords may be dropped.
243248
</dl>
244249

245250
<!--NewPage--><!-- this is for html2ps -->

css2/grammar.src

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: grammar.src,v 2.41 2005-03-02 04:41:45 bbos Exp $ -->
3+
<!-- $Id: grammar.src,v 2.42 2005-04-12 14:02:15 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Grammar of CSS&nbsp;2.1</TITLE>
@@ -150,21 +150,41 @@ title="iso-10646">ISO-10646</span>.
150150
h [0-9a-f]
151151
nonascii [\200-\377]
152152
unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])?
153-
escape {unicode}|\\[ -~\200-\377]
153+
escape {unicode}|\\[^\r\n\f0-9a-f]
154154
nmstart [_a-z]|{nonascii}|{escape}
155155
nmchar [_a-z0-9-]|{nonascii}|{escape}
156-
string1 \"([\t !#$%&amp;(-~]|\\{nl}|\'|{nonascii}|{escape})*\"
157-
string2 \'([\t !#$%&amp;(-~]|\\{nl}|\"|{nonascii}|{escape})*\'
156+
string1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\"
157+
string2 \'([^\n\r\f\\']|\\{nl}|{escape})*\'
158+
invalid1 \"([^\n\r\f\\"]|\\{nl}|{escape})*
159+
invalid2 \'([^\n\r\f\\']|\\{nl}|{escape})*
158160

159161
ident -?{nmstart}{nmchar}*
160162
name {nmchar}+
161163
num [0-9]+|[0-9]*"."[0-9]+
162164
string {string1}|{string2}
165+
invalid {invalid1}|{invalid2}
163166
url ([!#$%&amp;*-~]|{nonascii}|{escape})*
164167
s [ \t\r\n\f]
165168
w {s}*
166169
nl \n|\r\n|\r|\f
167170

171+
A a|\\0{0,4}(41|61)(\r\n|[ \t\r\n\f])?
172+
C c|\\0{0,4}(43|63)(\r\n|[ \t\r\n\f])?
173+
D d|\\0{0,4}(44|64)(\r\n|[ \t\r\n\f])?
174+
E e|\\0{0,4}(45|65)(\r\n|[ \t\r\n\f])?
175+
G g|\\0{0,4}(47|67)(\r\n|[ \t\r\n\f])?|\\g
176+
H h|\\0{0,4}(48|68)(\r\n|[ \t\r\n\f])?|\\h
177+
I i|\\0{0,4}(49|69)(\r\n|[ \t\r\n\f])?|\\i
178+
K k|\\0{0,4}(4b|6b)(\r\n|[ \t\r\n\f])?|\\k
179+
M m|\\0{0,4}(4d|6d)(\r\n|[ \t\r\n\f])?|\\m
180+
N n|\\0{0,4}(4e|6e)(\r\n|[ \t\r\n\f])?|\\n
181+
P p|\\0{0,4}(50|70)(\r\n|[ \t\r\n\f])?|\\p
182+
R r|\\0{0,4}(52|72)(\r\n|[ \t\r\n\f])?|\\r
183+
S s|\\0{0,4}(53|73)(\r\n|[ \t\r\n\f])?|\\s
184+
T t|\\0{0,4}(54|74)(\r\n|[ \t\r\n\f])?|\\t
185+
X x|\\0{0,4}(58|78)(\r\n|[ \t\r\n\f])?|\\x
186+
Z z|\\0{0,4}(5a|7a)(\r\n|[ \t\r\n\f])?|\\z
187+
168188
%%
169189

170190
{s}+ {return S;}
@@ -183,6 +203,7 @@ nl \n|\r\n|\r|\f
183203
{w}"," {return COMMA;}
184204

185205
{string} {return STRING;}
206+
{invalid} {return INVALID; /* unclosed string */}
186207

187208
{ident} {return IDENT;}
188209

@@ -195,21 +216,23 @@ nl \n|\r\n|\r|\f
195216

196217
"!"{w}"important" {return IMPORTANT_SYM;}
197218

198-
{num}em {return EMS;}
199-
{num}ex {return EXS;}
200-
{num}px {return LENGTH;}
201-
{num}cm {return LENGTH;}
202-
{num}mm {return LENGTH;}
203-
{num}in {return LENGTH;}
204-
{num}pt {return LENGTH;}
205-
{num}pc {return LENGTH;}
206-
{num}deg {return ANGLE;}
207-
{num}rad {return ANGLE;}
208-
{num}grad {return ANGLE;}
209-
{num}ms {return TIME;}
210-
{num}s {return TIME;}
211-
{num}Hz {return FREQ;}
212-
{num}kHz {return FREQ;}
219+
{num}{E}{M} {return EMS;}
220+
{num}{E}{X} {return EXS;}
221+
{num}{P}{X} {return LENGTH;}
222+
{num}{C}{M} {return LENGTH;}
223+
{num}{M}{M} {return LENGTH;}
224+
{num}{I}{N} {return LENGTH;}
225+
{num}{P}{T} {return LENGTH;}
226+
{num}{P}{C} {return LENGTH;}
227+
{num}{D}{E}{G} {return ANGLE;}
228+
{num}{R}{A}{D} {return ANGLE;}
229+
{num}{G}{R}{A}{D} {return ANGLE;}
230+
{num}{M}{S} {return TIME;}
231+
{num}{S} {return TIME;}
232+
{num}{H}{Z} {return FREQ;}
233+
{num}{K}{H}{Z} {return FREQ;}
234+
{num}{ident} {return DIMENSION;}
235+
213236
{num}% {return PERCENTAGE;}
214237
{num} {return NUMBER;}
215238

@@ -252,7 +275,7 @@ a style sheet contains a font family that has a tab in its name.
252275
backslash</a>) were not allowed in strings in CSS1.
253276

254277
<li>CSS2 parses a number immediately followed by an identifier as a
255-
DIMEN token (i.e., an unknown unit), CSS1 parsed it as a number and an
278+
DIMENSION token (i.e., an unknown unit), CSS1 parsed it as a number and an
256279
identifier. That means that in CSS1, the declaration 'font:
257280
10pt/1.2serif' was correct, as was 'font: 10pt/12pt serif'; in CSS2, a
258281
space is required before "serif". (Some UAs accepted the first

css2/properties/properties.db

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ table-cell | table-caption | none | inherit;;
303303
/* min-width;;
304304
<length> | <percentage> | inherit;;
305305
0;;
306-
all elements except non-replaced inline elements and table elements;;
306+
all elements but non-replaced inline elements, table rows, and row groups;;
307307
no;;
308308
refer to width of containing block;;
309309
visual;;
@@ -312,7 +312,7 @@ table-cell | table-caption | none | inherit;;
312312
/* max-width;;
313313
<length> | <percentage> | none | inherit;;
314314
none;;
315-
all elements except non-replaced inline elements and table elements;;
315+
all elements but non-replaced inline elements, table rows, and row groups;;
316316
no;;
317317
refer to width of containing block;;
318318
visual;;
@@ -321,7 +321,7 @@ table-cell | table-caption | none | inherit;;
321321
/* min-height;;
322322
<length> | <percentage> | inherit;;
323323
0;;
324-
all elements except non-replaced inline elements and table elements;;
324+
all elements but non-replaced inline elements, table columns, and column groups;;
325325
no;;
326326
see prose;;
327327
visual;;
@@ -330,7 +330,7 @@ table-cell | table-caption | none | inherit;;
330330
/* max-height;;
331331
<length> | <percentage> | none | inherit;;
332332
none;;
333-
all elements except non-replaced inline elements and table elements;;
333+
all elements but non-replaced inline elements, table columns, and column groups;;
334334
no;;
335335
see prose;;
336336
visual;;
@@ -642,7 +642,7 @@ table-cell | table-caption | none | inherit;;
642642
yes;;
643643
N/A;;
644644
visual, interactive;;
645-
absolute URI; otherwise as specified
645+
as specified, except with any relative URLs converted to absolute
646646
*/
647647

648648
/* volume;;

css2/selector.src

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>
22
<html lang="en">
3-
<!-- $Id: selector.src,v 2.92 2005-03-02 04:41:45 bbos Exp $ -->
3+
<!-- $Id: selector.src,v 2.93 2005-04-12 14:02:15 bbos Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<title>Selectors</title>
@@ -1161,13 +1161,15 @@ other properties as well.</p>
11611161

11621162
<h3><a name="first-letter">The</a> <span class="index-def" title="pseudo-elements:::first-letter|:first-letter|first-letter">:first-letter</span> pseudo-element</h3>
11631163

1164-
<p>The :first-letter pseudo-element may be used for <span
1165-
class="index-inst" title="initial caps">"initial caps"</span> and
1166-
<span class="index-inst" title="drop caps">"drop caps"</span>, which
1167-
are common typographical effects. This type of initial letter is
1168-
similar to an inline-level element if its <span
1169-
class="propinst-float">'float'</span> property is 'none', otherwise it
1170-
is similar to a floated element.</p>
1164+
<p>The :first-letter pseudo-element must select the first letter of
1165+
the first line of a block, if it is not preceded by any other content
1166+
(such as images or inline tables) on its line. The :first-letter
1167+
pseudo-element may be used for <span class="index-inst" title="initial
1168+
caps">"initial caps"</span> and <span class="index-inst" title="drop
1169+
caps">"drop caps"</span>, which are common typographical effects. This
1170+
type of initial letter is similar to an inline-level element if its
1171+
<span class="propinst-float">'float'</span> property is 'none',
1172+
otherwise it is similar to a floated element.</p>
11711173

11721174
<p>These are the properties that apply to :first-letter pseudo-elements:
11731175
<a href="fonts.html">font properties,</a>

css2/tables.src

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: tables.src,v 2.81 2005-03-03 22:46:08 bbos Exp $ -->
3+
<!-- $Id: tables.src,v 2.82 2005-04-12 14:02:15 bbos Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
66
<title>Tables</title>
@@ -264,13 +264,13 @@ boxes in visual table layout) according to the following rules:
264264
<li>If the parent P of a 'table-cell' box T is not a
265265
'table-row', a box corresponding to a 'table-row' will be
266266
generated between P and T. This box will span all consecutive
267-
'table-cell' siblings (in the document tree) of T.
267+
'table-cell' sibling boxes of T.
268268

269269
<li>If the parent P of a 'table-row' box T is not a 'table',
270270
'inline-table', 'table-header-group', 'table-footer-group' or
271271
'table-row-group' box, a box corresponding to a 'table'
272272
element will be generated between P and T. This box will span all
273-
consecutive siblings (in the document tree) of T that require a
273+
consecutive sibling boxes of T that require a
274274
'table' parent: 'table-row', 'table-row-group',
275275
'table-header-group', 'table-footer-group', 'table-column',
276276
'table-column-group', and 'table-caption'. T and T's siblings may
@@ -279,8 +279,8 @@ boxes in visual table layout) according to the following rules:
279279
<li>If the parent P of a 'table-column' box T is not a 'table',
280280
'inline-table', or 'table-column-group' box, a box
281281
corresponding to a 'table' element will be generated between P and
282-
T. This box will span all consecutive siblings (in the document
283-
tree) of T that require a 'table' parent: 'table-row',
282+
T. This box will span all consecutive sibling boxes
283+
of T that require a 'table' parent: 'table-row',
284284
'table-row-group', 'table-header-group', 'table-footer-group',
285285
'table-column', 'table-column-group', and 'table-caption', including
286286
any anonymous 'table-row' boxes generated by rule&nbsp;1.
@@ -289,8 +289,8 @@ boxes in visual table layout) according to the following rules:
289289
'table-footer-group', or 'table-column-group' or 'table-caption')
290290
box T is not a 'table' or 'inline-table', a box
291291
corresponding to a 'table' element will be generated between P and
292-
T. This box will span all consecutive siblings (in the document
293-
tree) of T that require a 'table' parent: 'table-row',
292+
T. This box will span all consecutive sibling boxess
293+
of T that require a 'table' parent: 'table-row',
294294
'table-row-group', 'table-header-group', 'table-footer-group',
295295
'table-column', 'table-column-group', and 'table-caption', including
296296
any anonymous 'table-row' boxes generated by rule&nbsp;1.

0 commit comments

Comments
 (0)