Skip to content

Commit c38aae1

Browse files
committed
[css2] Ian Hickson included nearly all errata. I did the rest. Still need to do cover page. Still need to decide what properties to take out. Still need to add inline-block
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401843
1 parent 21df46f commit c38aae1

20 files changed

+2083
-374
lines changed

css2/about.src

Lines changed: 57 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: about.src,v 2.33 1999-11-02 15:46:26 ijacobs Exp $ -->
3+
<!-- $Id: about.src,v 2.34 2002-04-22 22:05:20 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6-
<TITLE>About the CSS2 Specification</TITLE>
6+
<TITLE>About the CSS2.1 Specification</TITLE>
77
</HEAD>
88
<BODY>
9-
<H1 align="center">About the CSS2 Specification</H1>
9+
<H1 align="center">About the CSS2.1 Specification</H1>
1010

1111
<h2>Reading the specification</h2>
1212

@@ -33,6 +33,11 @@ numbers will not appear in the electronic version. In case of a
3333
discrepancy, the electronic version is considered the authoritative
3434
version of the document.
3535

36+
<p>For brevity, this specification is sometimes called CSS2 instead of
37+
CSS2.1. Unless explicitly stated, the name "CSS2" refers to this
38+
version of the specification and not to the version published in
39+
1998.</p>
40+
3641
<h2>How the specification is organized</h2>
3742

3843
<P>The specification is organized into the following sections:
@@ -386,12 +391,7 @@ have been possible.
386391

387392
<H2><a name="copyright">Copyright Notice</a></H2>
388393

389-
<p><strong>Copyright &copy; 1997 <a href="http://www.w3.org/">World Wide
390-
Web Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
391-
Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
392-
National de Recherche en Informatique et en Automatique</a>, <a
393-
href="http://www.keio.ac.jp/">Keio University</a>). All Rights
394-
Reserved.</strong>
394+
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Copyright"> Copyright</a> &copy; 1997-2002 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>&reg;</sup> (<a href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.inria.fr/"><acronym lang="fr" title="Institut National de Recherche en Informatique et Automatique">INRIA</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#W3C_Trademarks">trademark</a>, <a href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">document use</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">software licensing</a> rules apply.</p>
395395

396396
<p>Documents on the <a href="http://www.w3.org/">W3C</a> site are
397397
provided by the copyright holders under the following license. By
@@ -400,53 +400,60 @@ from which this statement is linked, you agree that you have read,
400400
understood, and will comply with the following terms and
401401
conditions:</p>
402402

403-
<p>Permission to use, copy, and distribute the contents of this
404-
document, or the W3C document from which this statement is linked, in
405-
any medium for any purpose and without fee or royalty is hereby
406-
granted, provided that you include the following on <i>ALL</i> copies
407-
of the document, or portions thereof, that you use:
408-
403+
<p>Public documents on the W3C site are provided by the copyright holders
404+
under the following license. The software or Document Type Definitions (DTDs)
405+
associated with W3C specifications are governed by the <a
406+
href="http://www.w3.org/Consortium/Legal/copyright-software.html"> Software
407+
Notice</a>. By using and/or copying this document, or the W3C document from
408+
which this statement is linked, you (the licensee) agree that you have read,
409+
understood, and will comply with the following terms and conditions:</p>
410+
411+
<p>Permission to use, copy, and distribute the contents of this document, or
412+
the W3C document from which this statement is linked, in any medium for any
413+
purpose and without fee or royalty is hereby granted, provided that you
414+
include the following on <i>ALL</i> copies of the document, or portions
415+
thereof, that you use:</p>
409416
<ol>
410-
<li>A link or URI to the original W3C document.</li>
411-
412-
<li>The pre-existing copyright notice of the original author, if it
413-
doesn't exist, a notice of the form: &quot;Copyright &copy; <a
414-
href="http://www.w3.org/">World Wide Web Consortium</a>, (<a
415-
href="http://www.lcs.mit.edu/">Massachusetts Institute of
416-
Technology</a>, <a href="http://www.inria.fr/">Institut National de
417-
Recherche en Informatique et en Automatique</a>, <a
418-
href="http://www.keio.ac.jp/">Keio University</a>). All Rights
419-
Reserved.&quot; </li>
420-
417+
<li>A link or URL to the original W3C document.</li>
418+
<li>The pre-existing copyright notice of the original author, or if it
419+
doesn't exist, a notice of the form: "Copyright � [$date-of-document] <a
420+
href="http://www.w3.org/">World Wide Web Consortium</a>, (<a
421+
href="http://www.lcs.mit.edu/">Massachusetts Institute of Technology</a>,
422+
<a href="http://www.inria.fr/"> Institut National de Recherche en
423+
Informatique et en Automatique</a>, <a href="http://www.keio.ac.jp/">Keio
424+
University</a>). All Rights Reserved.
425+
http://www.w3.org/Consortium/Legal/" (Hypertext is preferred, but a
426+
textual representation is permitted.)</li>
421427
<li><em>If it exists</em>, the STATUS of the W3C document.</li>
422428
</ol>
423429

424-
<p>When space permits, inclusion of the full text of this
425-
<b>NOTICE</b> should be provided. In addition, credit shall be
426-
attributed to the copyright holders for any software, documents, or
427-
other items or products that you create pursuant to the implementation
428-
of the contents of this document, or any portion thereof. </p>
429-
430-
<p>No right to create modifications or derivatives is granted pursuant
431-
to this license.</p>
432-
433-
<p><b>THIS DOCUMENT IS PROVIDED &quot;AS IS,&quot; AND COPYRIGHT HOLDERS
434-
MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING,
435-
BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
436-
PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF
437-
THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION
438-
OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
439-
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</b></p>
440-
441-
<p><b>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
442-
SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
443-
DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS
444-
THEREOF.</b></p>
430+
<p>When space permits, inclusion of the full text of this <b> NOTICE</b>
431+
should be provided. We request that authorship attribution be provided in any
432+
software, documents, or other items or products that you create pursuant to
433+
the implementation of the contents of this document, or any portion
434+
thereof.</p>
435+
436+
<p>No right to create modifications or derivatives of W3C documents is
437+
granted pursuant to this license. However, if additional requirements
438+
(documented in the <a href="IPR-FAQ.html">Copyright FAQ</a>) are satisfied,
439+
the right to create modifications or derivatives is�sometimes granted by the
440+
W3C to individuals complying with those requirements.</p>
441+
442+
<p>THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
443+
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED
444+
TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
445+
NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE
446+
FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT
447+
INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
448+
449+
<p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
450+
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE
451+
PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.</p>
445452

446453
<p>The name and trademarks of copyright holders may NOT be used in
447-
advertising or publicity pertaining to this document or its contents
448-
without specific, written prior permission. Title to copyright in this
449-
document will at all times remain with copyright holders. </p>
454+
advertising or publicity pertaining to this document or its contents without
455+
specific, written prior permission. Title to copyright in this document will
456+
at all times remain with copyright holders.</p>
450457

451458
</BODY>
452459
</HTML>

css2/aural.src

Lines changed: 3 additions & 3 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: aural.src,v 2.28 1999-11-02 15:52:13 ijacobs Exp $ -->
3+
<!-- $Id: aural.src,v 2.29 2002-04-22 22:05:21 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Aural style sheets</TITLE>
@@ -515,8 +515,8 @@ href="syndata.html#tokenization">identifiers</a>. It is also
515515
recommended to quote specific voices with a name consisting of more
516516
than one word. If quoting is omitted, any <a
517517
href="syndata.html#whitespace">whitespace</a> characters before and
518-
after the font name are ignored and any sequence of whitespace
519-
characters inside the font name is converted to a single space.
518+
after the voice family name are ignored and any sequence of whitespace
519+
characters inside the voice family name is converted to a single space.
520520

521521
<!-- #include src=properties/pitch.srb -->
522522

css2/box.src

Lines changed: 10 additions & 6 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: box.src,v 1.20 2000-08-08 18:34:17 ijacobs Exp $ -->
3+
<!-- $Id: box.src,v 1.21 2002-04-22 22:05:21 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Box model</TITLE>
@@ -102,14 +102,14 @@ interact. The example HTML document:
102102
&lt;TITLE&gt;Examples of margins, padding, and borders&lt;/TITLE&gt;
103103
&lt;STYLE type="text/css"&gt;
104104
UL {
105-
background: green;
105+
background: yellow;
106106
margin: 12px 12px 12px 12px;
107107
padding: 3px 3px 3px 3px;
108108
/* No borders set */
109109
}
110110
LI {
111-
color: black; /* text color is black */
112-
background: gray; /* Content, padding will be gray */
111+
color: white; /* text color is black */
112+
background: blue; /* Content, padding will be blue */
113113
margin: 12px 12px 12px 12px;
114114
padding: 12px 0px 12px 12px; /* Note 0px padding right */
115115
list-style: none /* no glyphs before a list item */
@@ -118,7 +118,7 @@ interact. The example HTML document:
118118
LI.withborder {
119119
border-style: dashed;
120120
border-width: medium; /* sets border width on all sides */
121-
border-color: black;
121+
border-color: lime;
122122
}
123123
&lt;/STYLE&gt;
124124
&lt;/HEAD&gt;
@@ -579,7 +579,11 @@ it were coming out of the canvas.
579579
<P>All borders are drawn on top of the box's background. The color of
580580
borders drawn for values of 'groove', 'ridge', 'inset', and 'outset'
581581
depends on the element's <a href="#border-color-properties">border
582-
color properties</a>.
582+
color properties</a>, but UAs may choose their own algorithm to
583+
calculate the actual colors used. For instance, if the 'border-color'
584+
has the value 'silver', then a UA could use a gradient of colors from
585+
white to dark gray to indicate a sloping border.
586+
583587

584588
<P><span class="index-inst" title="conformance"><a
585589
href="conform.html#conformance">Conforming HTML user agents</a></span> may

css2/cascade.src

Lines changed: 30 additions & 25 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: cascade.src,v 2.32 1999-11-04 21:13:19 ijacobs Exp $ -->
3+
<!-- $Id: cascade.src,v 2.33 2002-04-22 22:05:21 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Assigning property values, Cascading, and Inheritance</TITLE>
@@ -156,6 +156,7 @@ means that, for a given element, the property takes the same <a
156156
href="#computed-value">computed value</a> as the property for the
157157
element's parent. The inherited value, which is normally only used as
158158
a fallback value, can be strengthened by setting 'inherit' explicitly.
159+
It can also be used on properties that are not normally inherited.
159160

160161
<div class="example"><P>In the example below, the <span
161162
class="propinst-color">'color'</span> and <span
@@ -376,56 +377,60 @@ P { font-size: 24pt }
376377
<P>A selector's specificity is calculated as follows:</p>
377378

378379
<ul>
379-
<li>count the number of ID attributes in the selector (= a)
380+
<li>count 1 if the selector is a 'style' attribute rather than a
381+
selector, 0 otherwise (= a) (In HTML, values of an element's "style"
382+
attribute are style sheet rules. These rules have no selectors, so
383+
a=1, b=0, c=0, and d=0.)
384+
<li>count the number of ID attributes in the selector (= b)
380385
<li>count the number of other attributes and pseudo-classes
381-
in the selector (= b)
382-
<li>count the number of element names in the selector (= c)
386+
in the selector (= c)
387+
<li>count the number of element names in the selector (= d)
383388
<li>ignore pseudo-elements.
384389
</ul>
385390

386-
<P>Concatenating the three numbers a-b-c (in a number system with a large
391+
<P>Concatenating the four numbers a-b-c-d (in a number system with a large
387392
base) gives the specificity.
388393

389394
<div class="example"><P>
390395
Some examples:
391396

392397
<PRE>
393-
* {} /* a=0 b=0 c=0 -&gt; specificity = 0 */
394-
LI {} /* a=0 b=0 c=1 -&gt; specificity = 1 */
395-
UL LI {} /* a=0 b=0 c=2 -&gt; specificity = 2 */
396-
UL OL+LI {} /* a=0 b=0 c=3 -&gt; specificity = 3 */
397-
H1 + *[REL=up]{} /* a=0 b=1 c=1 -&gt; specificity = 11 */
398-
UL OL LI.red {} /* a=0 b=1 c=3 -&gt; specificity = 13 */
399-
LI.red.level {} /* a=0 b=2 c=1 -&gt; specificity = 21 */
400-
#x34y {} /* a=1 b=0 c=0 -&gt; specificity = 100 */
398+
* {} /* a=0 b=0 c=0 d=0 -&gt; specificity = 0,0,0,0 */
399+
LI {} /* a=0 b=0 c=0 d=1 -&gt; specificity = 0,0,0,1 */
400+
UL LI {} /* a=0 b=0 c=0 d=2 -&gt; specificity = 0,0,0,2 */
401+
UL OL+LI {} /* a=0 b=0 c=0 d=3 -&gt; specificity = 0,0,0,3 */
402+
H1 + *[REL=up]{} /* a=0 b=0 c=1 d=1 -&gt; specificity = 0,0,1,1 */
403+
UL OL LI.red {} /* a=0 b=0 c=1 d=3 -&gt; specificity = 0,0,1,3 */
404+
LI.red.level {} /* a=0 b=0 c=2 d=1 -&gt; specificity = 0,0,2,1 */
405+
#x34y {} /* a=0 b=1 c=0 d=0 -&gt; specificity = 0,1,0,0 */
406+
style="" /* a=1 b=0 c=0 d=0 -&gt; specificity = 1,0,0,0 */
401407
</PRE>
402408
</div>
403409

404-
405-
<P>In HTML, values of an element's "style" attribute are style sheet
406-
rules. These rules have no selectors, but for the purpose of step 3 of
407-
the cascade algorithm, they are considered to have an ID selector
408-
(specificity: a=1, b=0, c=0). For the purpose of step 4, they are
409-
considered to be after all other rules.
410-
411410
<div class="html-example"><P>
412411
<PRE>
413412
&lt;HEAD&gt;
414413
&lt;STYLE type="text/css"&gt;
415-
#x97z { color: blue }
414+
#x97z { color: red }
416415
&lt;/STYLE&gt;
417416
&lt;/HEAD&gt;
418417
&lt;BODY&gt;
419-
&lt;P ID=x97z style="color: red"&gt;
418+
&lt;P ID=x97z style="color: green"&gt;
420419
&lt;/BODY&gt;
421420
</PRE>
422421

423422
<P> In the above example, the color of the P element would be
424-
red. Although the specificity is the same for both declarations, the
425-
declaration in the "style" attribute will override the one in the
426-
STYLE element because of cascading rule 4.
423+
green. The declaration in the "style" attribute will override the one in
424+
the STYLE element because of cascading rule 3, since it has a higher
425+
specificity.
427426
</div>
428427

428+
<p>Note: The specificity is based only on the form of the selector. In
429+
particular, a selector of the form "[id=p33]" is counted as an
430+
attribute selector (a=0, b=0, c=1, d=0), even if the id attribute is
431+
defined as an "ID" in the source document's DTD.
432+
433+
429434
<H3>Precedence of non-CSS presentational hints</H3>
430435

431436
<P>The UA may choose to honor presentational hints from other sources

0 commit comments

Comments
 (0)