Skip to content

Commit 16404ba

Browse files
committed
[css2] Generated. Do not edit!
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402292
1 parent 1af9115 commit 16404ba

14 files changed

Lines changed: 258 additions & 160 deletions

css2/colors.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ <h2><a name="q2">14.2 The background</a></h2>
109109
</p>
110110

111111
<p>For HTML documents, however, we recommend that authors specify the
112-
background for the BODY element rather than the HTML element. User
113-
agents should observe the following precedence rules to fill in the
114-
background of the canvas of HTML documents:
115-
if the value of the <a href="colors.html#propdef-background" class="noxref"><span class="propinst-background">'background'</span></a> property for the HTML
116-
element is different from 'transparent' then use it, else use the
117-
value of the <a href="colors.html#propdef-background" class="noxref"><span class="propinst-background">'background'</span></a>
118-
property for the BODY element. If the resulting value is
119-
'transparent', the rendering is undefined. This does not apply to XHTML documents.
112+
background for the BODY element rather than the HTML element.
113+
For HTML documents whose root HTML element has computed values of
114+
'transparent' for <a href="colors.html#propdef-background-color" class="noxref"><span
115+
class="propinst-background-color">'background-color'</span></a> and 'none'
116+
for <a href="colors.html#propdef-background-image" class="noxref"><span class="propinst-background-image">'background-image'</span></a>,
117+
user agents must instead use the computed value of those properties
118+
from that HTML element's first BODY element child when painting
119+
backgrounds for the canvas, and must not paint a background for that
120+
BODY element.
121+
This does not apply to XHTML documents.
120122
</p>
121123
<div class="html-example"><p>
122124
According to these rules, the canvas underlying the following

css2/conform.html

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,23 @@ <H2><a name="q1">3.1 Definitions</a></H2>
134134
<a name="replaced-element">Replaced
135135
element</a></span></strong>
136136

137-
<dd>An element for which the CSS formatter knows only the intrinsic
138-
dimensions. In HTML, IMG and OBJECT elements can be replaced elements.
139-
For example, the content of the IMG element is often replaced by the
140-
image that the "src" attribute designates.
137+
<dd><p>An element that is outside the scope of the CSS formatter, such
138+
as an image, embedded document, or applet. For example, the content of
139+
the HTML IMG element is often replaced by the image that its "src"
140+
attribute designates. Replaced elements often have intrinsic
141+
dimensions: an intrinsic width, an intrinsic height, and an intrinsic
142+
ratio. For example, a bitmap image has an intrinsic width and an
143+
intrinsic height specified in absolute units (from which the intrinsic
144+
ratio can obviously be determined). On the other hand, other documents
145+
may not have any intrinsic dimensions (for example a blank HTML
146+
document).
147+
148+
<p>User agents may consider a replaced element to not have any
149+
intrinsic dimensions if it is believed that those dimensions could
150+
leak sensitive information to a third party. For example, if an HTML
151+
document changed intrinsic size depending on the user's bank balance,
152+
then the UA might want to act as if that resource had no intrinsic
153+
dimensions.
141154

142155
<dt><strong><span class="index-def" title="intrinsic
143156
dimensions"><a name="intrinsic">Intrinsic dimensions</a></span></strong>
@@ -346,10 +359,6 @@ <h2>3.2 <a name="conformance">Conformance</a></h2>
346359
with the "alternate" keyword in HTML 4.0 <a href="refs.html#ref-HTML40" rel="biblioentry" class="noxref"><span class="informref">[HTML40]</span></a>), the UA must
347360
allow the user to select which style sheet set the UA should apply.
348361

349-
<li>User agents must give the user the ability to turn off the
350-
influence of specific author style sheets. Conformance to UAAG 1.0
351-
checkpoint 4.14 satisfies this condition [[-UUAG]].
352-
353362
<li>The UA must allow the user to turn off the influence of author style sheets.
354363

355364
</ol>

css2/cover.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ <h3>Features at risk</h3>
255255
algorithm for tables is restricted to (1) the containing block width
256256
and (2) the content and properties of the table and its
257257
children. This restriction may be lifted.
258+
<dt>Quotes
259+
<dd>
260+
<p>The <span class="propinst-quotes">'quotes'</span> property and the
261+
'open-quote', 'close-quote', 'no-open-quote' and 'no-close-quote'
262+
keywords may be dropped.
258263
</dl>
259264

260265
<!--NewPage--><!-- this is for html2ps -->
@@ -633,6 +638,7 @@ <h2><a name="toc">Full Table of Contents</a></h2>
633638
<ul class="toc">
634639
<li class="tocline3"><a href="text.html#q8" class="tocxref">16.6.1 The 'white-space' processing model</a>
635640
<li class="tocline3"><a href="text.html#q9" class="tocxref">16.6.2 Example of bidirectionality with white-space collapsing</a>
641+
<li class="tocline3"><a href="text.html#q10" class="tocxref">16.6.3 Control and combining characters' details</a>
636642
</ul>
637643
</ul>
638644
<li class="tocline1"><a href="tables.html" class="tocxref">17 Tables</a>

css2/fonts.html

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,8 @@ <h2>15.7 <a name="font-size-props">Font size</a>: the <a href="fonts.html#propde
531531
sizes computed and kept by the UA. Possible values are:
532532
<p> [ xx-small | x-small | small | medium | large | x-large | xx-large ]</p>
533533
<p>The following table provides user agent guidelines for the absolute-size
534-
scaling factor and their mapping to HTML heading and absolute font-sizes. The
535-
'medium' value is used as the reference middle value. The user agent may fine
536-
tune these values for different fonts or different types of display devices.</p>
534+
mapping to HTML heading and absolute font-sizes. The 'medium' value is
535+
the user's preferred font size and is used as the reference middle value.</p>
537536

538537
<table border="1" style="border-collapse: collapse" width="73%" id="AutoNumber2">
539538
<tr>
@@ -548,40 +547,34 @@ <h2>15.7 <a name="font-size-props">Font size</a>: the <a href="fonts.html#propde
548547
<td style="width:8%">&nbsp;</td>
549548
</tr>
550549
<tr>
551-
<th style="width:16%">scaling factor</th>
552-
<td style="width:12%">3/5</td>
553-
<td style="width:9%">3/4</td>
554-
<td style="width:10%">8/9</td>
555-
<td style="width:11%">1</td>
556-
<td style="width:11%">6/5</td>
557-
<td style="width:12%">3/2</td>
558-
<td style="width:11%">2/1</td>
559-
<td style="width:8%">3/1</td>
550+
<th>HTML headings</th>
551+
<td>h6</td>
552+
<td>&nbsp;</td>
553+
<td>h5</td>
554+
<td>h4</td>
555+
<td>h3</td>
556+
<td>h2</td>
557+
<td>h1</td>
558+
<td>&nbsp;</td>
560559
</tr>
561560
<tr>
562-
<th style="width:16%">HTML headings</th>
563-
<td style="width:12%">h6</td>
564-
<td style="width:9%">&nbsp;</td>
565-
<td style="width:10%">h5</td>
566-
<td style="width:11%">h4</td>
567-
<td style="width:11%">h3</td>
568-
<td style="width:12%">h2</td>
569-
<td style="width:11%">h1</td>
570-
<td style="width:8%">&nbsp;</td>
571-
</tr>
572-
<tr>
573-
<th style="width:16%">HTML font sizes</th>
574-
<td style="width:12%">1</td>
575-
<td style="width:9%">&nbsp;</td>
576-
<td style="width:10%">2</td>
577-
<td style="width:11%">3</td>
578-
<td style="width:11%">4</td>
579-
<td style="width:12%">5</td>
580-
<td style="width:11%">6</td>
581-
<td style="width:8%">7</td>
561+
<th>HTML font sizes</th>
562+
<td>1</td>
563+
<td>&nbsp;</td>
564+
<td>2</td>
565+
<td>3</td>
566+
<td>4</td>
567+
<td>5</td>
568+
<td>6</td>
569+
<td>7</td>
582570
</tr>
583571
</table>
584572

573+
<p class="note">Note: implementation experience has demonstrated that a fixed ratio between adjacent absolute-size keywords is problematic, and this specification does NOT recommend such a fixed ratio, in contrast to previous specifications (<a href="http://www.w3.org/TR/REC-CSS1#font-size">CSS1 suggested 1.5</a>, and <a href="http://www.w3.org/TR/REC-CSS2/fonts.html#font-size-props">CSS2 suggested 1.2</a>).</p>
574+
575+
<p>Implementors should build a table of scaling factors for absolute-size keywords relative to the 'medium' font size and the particular device and its characteristics (e.g. the resolution of the device).
576+
</p>
577+
585578
<p>
586579
Different media may need different scaling factors. Also, the UA
587580
should take the quality and availability of fonts into account when

css2/generate.html

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -226,21 +226,21 @@ <h2>12.2 <a name="content">The</a> <a href="generate.html#propdef-content" class
226226
The former has two forms:
227227
'counter(<var>name</var>)' or 'counter(<var>name</var>,
228228
<var>style</var>)'.
229-
The generated text is the value of the named
230-
counter at this point in the formatting structure; it
231-
is formatted in the indicated
232-
<a href="#counter-styles">style</a> ('decimal' by default).
233-
The latter function also has two forms:
234-
'counters(<var>name</var>, <var>string</var>)' or 'counters(<var>name</var>,
235-
<var>string</var>, <var>style</var>)'. The generated text is the value of all
236-
counters with the given name at this point in the formatting structure,
237-
separated by the specified string. The counters are rendered
238-
in the indicated <a href="#counter-styles">style</a> ('decimal' by default).
239-
See the section on <a href="#counters">automatic counters and
240-
numbering</a> for more information.
241-
<dt><span class="index-inst" title="open-quote"><a name="x13" href="generate.html#value-def-open-quote" class="noxref"><span
242-
class="value-inst-open-quote"><strong>open-quote</strong></span></a></span> and
243-
<span class="index-inst" title="close-quote"><a name="x14" href="generate.html#value-def-close-quote" class="noxref"><span
229+
230+
The generated text is the value of the innermost counter of the given
231+
name in scope at this pseudo-element; it is formatted in the indicated
232+
<a href="#counter-styles">style</a> ('decimal' by default). The latter
233+
function also has two forms: 'counters(<var>name</var>,
234+
<var>string</var>)' or 'counters(<var>name</var>, <var>string</var>,
235+
<var>style</var>)'. The generated text is the value of all counters
236+
with the given name in scope at this pseudo-element, from outermost to
237+
innermost separated by the specified string. The counters are rendered
238+
in the indicated <a href="#counter-styles">style</a> ('decimal' by
239+
default). See the section on <a href="#counters">automatic counters
240+
and numbering</a> for more information. <dt><span class="index-inst"
241+
title="open-quote"><a name="x13" href="generate.html#value-def-open-quote" class="noxref"><span
242+
class="value-inst-open-quote"><strong>open-quote</strong></span></a></span>
243+
and <span class="index-inst" title="close-quote"><a name="x14" href="generate.html#value-def-close-quote" class="noxref"><span
244244
class="value-inst-close-quote"><strong>close-quote</strong></span></a></span>
245245

246246
<dd>These values are replaced by the appropriate string
@@ -560,6 +560,8 @@ <h2>12.4 Automatic <span class="index-def" title="counters"><a
560560
H1:before {
561561
content: "Chapter " counter(chapter) ". ";
562562
counter-increment: chapter; /* Add 1 to chapter */
563+
}
564+
H1 {
563565
counter-reset: section; /* Set section to 0 */
564566
}
565567
H2:before {
@@ -641,14 +643,19 @@ <h3>12.4.1 <a name="scope">Nested counters and scope</a></h3>
641643
of a counter starts at the first element in the document that has a
642644
<a href="generate.html#propdef-counter-reset" class="noxref"><span class="propinst-counter-reset">'counter-reset'</span></a> for that
643645
counter and includes the element's descendants and its following
644-
siblings with their descendants.
646+
siblings with their descendants. However, it does not include any
647+
elements in the scope of a counter created by a 'counter-reset' on a
648+
later sibling of the element or by a later 'counter-reset' on the same
649+
element.
645650

646651
<p>If <a href="generate.html#propdef-counter-increment" class="noxref"><span
647652
class="propinst-counter-increment">'counter-increment'</span></a> or <a href="generate.html#propdef-content" class="noxref"><span
648-
class="propinst-content">'content'</span></a> refers to a counter that is
649-
not in the scope of any <a href="generate.html#propdef-counter-reset" class="noxref"><span
650-
class="propinst-counter-reset">'counter-reset'</span></a>, the counter is
651-
assumed to have been reset to 0 by the root element.
653+
class="propinst-content">'content'</span></a> on an element or
654+
pseudo-element refers to a counter that is not in the scope of any
655+
<a href="generate.html#propdef-counter-reset" class="noxref"><span class="propinst-counter-reset">'counter-reset'</span></a>,
656+
implementations should behave as though a <a href="generate.html#propdef-counter-reset" class="noxref"><span
657+
class="propinst-counter-reset">'counter-reset'</span></a> had reset the
658+
counter to 0 on that element or pseudo-element.
652659

653660
<p>In the example above, an OL will create a counter, and all children
654661
of the OL will refer to that counter.
@@ -685,9 +692,9 @@ <h3>12.4.1 <a name="scope">Nested counters and scope</a></h3>
685692
</pre>
686693
</div>
687694

688-
<p>The 'counters()' function generates a string composed of the values
689-
of all counters with the same name on the element and its ancestors,
690-
separated by a given string.
695+
<p>The 'counters()' function generates a string composed of all of the
696+
counters with the same name that are in scope, separated by a given
697+
string.
691698

692699
<div class="example"><P style="display:none">Example(s):</P><P>
693700
<P>The following style sheet numbers nested list items
@@ -696,7 +703,7 @@ <h3>12.4.1 <a name="scope">Nested counters and scope</a></h3>
696703
<PRE>
697704
OL { counter-reset: item }
698705
LI { display: block }
699-
LI:before { content: counters(item, "."); counter-increment: item }
706+
LI:before { content: counters(item, ".") " "; counter-increment: item }
700707
</PRE>
701708
</div>
702709

css2/grammar.html

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -175,21 +175,41 @@ <h2><a name="q2">G.2 Lexical scanner</a></h2>
175175
h [0-9a-f]
176176
nonascii [\200-\377]
177177
unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])?
178-
escape {unicode}|\\[ -~\200-\377]
178+
escape {unicode}|\\[^\r\n\f0-9a-f]
179179
nmstart [_a-z]|{nonascii}|{escape}
180180
nmchar [_a-z0-9-]|{nonascii}|{escape}
181-
string1 \"([\t !#$%&amp;(-~]|\\{nl}|\'|{nonascii}|{escape})*\"
182-
string2 \'([\t !#$%&amp;(-~]|\\{nl}|\"|{nonascii}|{escape})*\'
181+
string1 \"([^\n\r\f\\"]|\\{nl}|{escape})*\"
182+
string2 \'([^\n\r\f\\']|\\{nl}|{escape})*\'
183+
invalid1 \"([^\n\r\f\\"]|\\{nl}|{escape})*
184+
invalid2 \'([^\n\r\f\\']|\\{nl}|{escape})*
183185

184186
ident -?{nmstart}{nmchar}*
185187
name {nmchar}+
186188
num [0-9]+|[0-9]*"."[0-9]+
187189
string {string1}|{string2}
190+
invalid {invalid1}|{invalid2}
188191
url ([!#$%&amp;*-~]|{nonascii}|{escape})*
189192
s [ \t\r\n\f]
190193
w {s}*
191194
nl \n|\r\n|\r|\f
192195

196+
A a|\\0{0,4}(41|61)(\r\n|[ \t\r\n\f])?
197+
C c|\\0{0,4}(43|63)(\r\n|[ \t\r\n\f])?
198+
D d|\\0{0,4}(44|64)(\r\n|[ \t\r\n\f])?
199+
E e|\\0{0,4}(45|65)(\r\n|[ \t\r\n\f])?
200+
G g|\\0{0,4}(47|67)(\r\n|[ \t\r\n\f])?|\\g
201+
H h|\\0{0,4}(48|68)(\r\n|[ \t\r\n\f])?|\\h
202+
I i|\\0{0,4}(49|69)(\r\n|[ \t\r\n\f])?|\\i
203+
K k|\\0{0,4}(4b|6b)(\r\n|[ \t\r\n\f])?|\\k
204+
M m|\\0{0,4}(4d|6d)(\r\n|[ \t\r\n\f])?|\\m
205+
N n|\\0{0,4}(4e|6e)(\r\n|[ \t\r\n\f])?|\\n
206+
P p|\\0{0,4}(50|70)(\r\n|[ \t\r\n\f])?|\\p
207+
R r|\\0{0,4}(52|72)(\r\n|[ \t\r\n\f])?|\\r
208+
S s|\\0{0,4}(53|73)(\r\n|[ \t\r\n\f])?|\\s
209+
T t|\\0{0,4}(54|74)(\r\n|[ \t\r\n\f])?|\\t
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+
193213
%%
194214

195215
{s}+ {return S;}
@@ -208,6 +228,7 @@ <h2><a name="q2">G.2 Lexical scanner</a></h2>
208228
{w}"," {return COMMA;}
209229

210230
{string} {return STRING;}
231+
{invalid} {return INVALID; /* unclosed string */}
211232

212233
{ident} {return IDENT;}
213234

@@ -220,21 +241,23 @@ <h2><a name="q2">G.2 Lexical scanner</a></h2>
220241

221242
"!"{w}"important" {return IMPORTANT_SYM;}
222243

223-
{num}em {return EMS;}
224-
{num}ex {return EXS;}
225-
{num}px {return LENGTH;}
226-
{num}cm {return LENGTH;}
227-
{num}mm {return LENGTH;}
228-
{num}in {return LENGTH;}
229-
{num}pt {return LENGTH;}
230-
{num}pc {return LENGTH;}
231-
{num}deg {return ANGLE;}
232-
{num}rad {return ANGLE;}
233-
{num}grad {return ANGLE;}
234-
{num}ms {return TIME;}
235-
{num}s {return TIME;}
236-
{num}Hz {return FREQ;}
237-
{num}kHz {return FREQ;}
244+
{num}{E}{M} {return EMS;}
245+
{num}{E}{X} {return EXS;}
246+
{num}{P}{X} {return LENGTH;}
247+
{num}{C}{M} {return LENGTH;}
248+
{num}{M}{M} {return LENGTH;}
249+
{num}{I}{N} {return LENGTH;}
250+
{num}{P}{T} {return LENGTH;}
251+
{num}{P}{C} {return LENGTH;}
252+
{num}{D}{E}{G} {return ANGLE;}
253+
{num}{R}{A}{D} {return ANGLE;}
254+
{num}{G}{R}{A}{D} {return ANGLE;}
255+
{num}{M}{S} {return TIME;}
256+
{num}{S} {return TIME;}
257+
{num}{H}{Z} {return FREQ;}
258+
{num}{K}{H}{Z} {return FREQ;}
259+
{num}{ident} {return DIMENSION;}
260+
238261
{num}% {return PERCENTAGE;}
239262
{num} {return NUMBER;}
240263

@@ -277,7 +300,7 @@ <h2>G.3 <a name="tokenizer-diffs">Comparison of tokenization in CSS&nbsp;2.1 and
277300
backslash</a>) were not allowed in strings in CSS1.
278301

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

css2/propidx.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,31 +454,31 @@ <H1><a name="q0">Appendix F. Full property table</a></H1>
454454
<tr><td><a href="visudet.html#propdef-max-height"><span class="propinst-max-height xref">'max-height'</span></a>
455455
<td><a href="syndata.html#value-def-length" class="noxref"><span class="value-inst-length">&lt;length&gt;</span></a> | <a href="syndata.html#value-def-percentage" class="noxref"><span class="value-inst-percentage">&lt;percentage&gt;</span></a> | none | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
456456
<td>none
457-
<td>all elements except non-replaced inline elements and table elements
457+
<td>all elements but non-replaced inline elements, table columns, and column groups
458458
<td>no
459459
<td>see prose
460460
<td><a href="media.html#visual-media-group">visual</a>
461461

462462
<tr><td><a href="visudet.html#propdef-max-width"><span class="propinst-max-width xref">'max-width'</span></a>
463463
<td><a href="syndata.html#value-def-length" class="noxref"><span class="value-inst-length">&lt;length&gt;</span></a> | <a href="syndata.html#value-def-percentage" class="noxref"><span class="value-inst-percentage">&lt;percentage&gt;</span></a> | none | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
464464
<td>none
465-
<td>all elements except non-replaced inline elements and table elements
465+
<td>all elements but non-replaced inline elements, table rows, and row groups
466466
<td>no
467467
<td>refer to width of containing block
468468
<td><a href="media.html#visual-media-group">visual</a>
469469

470470
<tr><td><a href="visudet.html#propdef-min-height"><span class="propinst-min-height xref">'min-height'</span></a>
471471
<td><a href="syndata.html#value-def-length" class="noxref"><span class="value-inst-length">&lt;length&gt;</span></a> | <a href="syndata.html#value-def-percentage" class="noxref"><span class="value-inst-percentage">&lt;percentage&gt;</span></a> | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
472472
<td>0
473-
<td>all elements except non-replaced inline elements and table elements
473+
<td>all elements but non-replaced inline elements, table columns, and column groups
474474
<td>no
475475
<td>see prose
476476
<td><a href="media.html#visual-media-group">visual</a>
477477

478478
<tr><td><a href="visudet.html#propdef-min-width"><span class="propinst-min-width xref">'min-width'</span></a>
479479
<td><a href="syndata.html#value-def-length" class="noxref"><span class="value-inst-length">&lt;length&gt;</span></a> | <a href="syndata.html#value-def-percentage" class="noxref"><span class="value-inst-percentage">&lt;percentage&gt;</span></a> | <a href="cascade.html#value-def-inherit" class="noxref"><span class="value-inst-inherit">inherit</span></a>
480480
<td>0
481-
<td>all elements except non-replaced inline elements and table elements
481+
<td>all elements but non-replaced inline elements, table rows, and row groups
482482
<td>no
483483
<td>refer to width of containing block
484484
<td><a href="media.html#visual-media-group">visual</a>

0 commit comments

Comments
 (0)