Skip to content

Commit b9299bc

Browse files
committed
[css2] Selectors updated, order of documents changed so that doctree is before syntax
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%4044
1 parent a3f8fd4 commit b9299bc

5 files changed

Lines changed: 97 additions & 60 deletions

File tree

css2/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile to generate the CSS2 document based on its "source files"
22
# Arnaud Le Hors - lehors@w3.org
3-
# $Id: Makefile,v 1.13 1997-08-15 14:00:16 ian Exp $
3+
# $Id: Makefile,v 1.14 1997-08-21 20:39:45 ian Exp $
44

55
ROOT = .
66

@@ -15,8 +15,8 @@ about.src\
1515
tutorial.src\
1616
cssdesgn.src\
1717
convent.src\
18-
syndata.src\
1918
doctree.src\
19+
syndata.src\
2020
selector.src\
2121
cascade.src\
2222
media.src\
@@ -48,8 +48,8 @@ about.html\
4848
tutorial.html\
4949
cssdesgn.html\
5050
convent.html\
51-
syndata.html\
5251
doctree.html\
52+
syndata.html\
5353
selector.html\
5454
cascade.html\
5555
media.html\
@@ -121,8 +121,8 @@ ADDLINKS= $(PERL) ./bin/addlinks
121121

122122
# utility to generate the PostScript version
123123
# -R seems broken for this spec.
124-
# HTML2PSARGS= -n -D -R
125-
HTML2PSARGS= -n -D
124+
HTML2PSARGS= -n -D -R
125+
#HTML2PSARGS= -n -D
126126
HTML2PS= $(PERL) html2ps
127127
HTML2PS= html2ps
128128

css2/colors.src

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40/sgml/HTML4.dtd">
22
<html lang="en">
3-
<!-- $Id: colors.src,v 1.8 1997-08-14 00:36:19 ian Exp $ -->
3+
<!-- $Id: colors.src,v 1.9 1997-08-21 20:40:10 ian Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Colors and backgrounds</TITLE>
@@ -324,8 +324,8 @@ corner of the canvas.
324324
<DIV class="propdef">
325325
<H4 class=propname>
326326
<a name="propdef-background">
327-
<span class="index-def" title="'background', definition of">
328-
'background'</span></a></H4>
327+
<span class="index-def" title="'background',
328+
definition of | shorthand, 'background'"> 'background'</span></a></H4>
329329
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>background</TR>
330330
<TR><TH align="right">Value:<TD>
331331
<span class="propinst-background-color">&lt;'background-color'&gt;</span> ||

css2/conform.src

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40/sgml/HTML4.dtd">
22
<html lang="en">
3-
<!-- $Id: conform.src,v 1.8 1997-08-14 00:38:06 ian Exp $ -->
3+
<!-- $Id: conform.src,v 1.9 1997-08-21 20:40:30 ian Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Definitions and document conventions</TITLE>
7-
<LINK rel="next" href="syndata.html">
7+
<LINK rel="next" href="doctree.html">
88
<LINK rel="previous" href="cssdesgn.html">
99
<LINK rel="STYLESHEET" href="style/default.css" type="text/css">
1010
</HEAD>
@@ -18,7 +18,7 @@
1818
<dt><span class="index-def" title="object language"><em>Object
1919
language</em></span>
2020
<dd>??
21-
<dt><span class="index-def" title="element"><em>element</em></span>
21+
<dt><span class="index-def" title="element"><em>Element</em></span>
2222
<dd>??
2323
<dt><span class="index-def" title="CSS2 core"><em>CSS2 core</em></span>
2424
<dd>The core functionality consists of the whole CSS2 specification
@@ -109,15 +109,15 @@ names is the property name (complete with quotes) between "&lt;" and
109109
the document, each instance of this type of non-terminal links to the
110110
corresponding property definition.
111111

112-
<P>non-terminals that do not share the same name as a property. In
112+
<li> non-terminals that do not share the same name as a property. In
113113
this case, the non-terminal name appears between "&lt;" and "&gt;"
114114
(e.g., &lt;border-width&gt;) and its definition is located near its
115115
first appearance in the specification. In the electronic version of
116116
the document, each instance of this type of non-terminal links to the
117117
corresponding value definition.
118118
</ol>
119119

120-
<H3>HTML information</H3>
120+
<H3>HTML conventions</H3>
121121
<P>HTML elements are in all upper case letters (e.g., HTML, BODY, EM,
122122
P).
123123

css2/doctree.src

Lines changed: 67 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,56 @@
11
<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40/sgml/HTML4.dtd">
22
<html lang="en">
3-
<!-- $Id: doctree.src,v 1.6 1997-08-14 00:40:04 ian Exp $ -->
3+
<!-- $Id: doctree.src,v 1.7 1997-08-21 20:40:41 ian Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6-
<TITLE>CSS2 document tree</TITLE>
7-
<LINK rel="next" href="selector.html">
8-
<LINK rel="previous" href="syndata.html">
6+
<TITLE>Document tree</TITLE>
7+
<LINK rel="next" href="syndata.html">
8+
<LINK rel="previous" href="convent.html">
99
<LINK rel="STYLESHEET" href="style/default.css" type="text/css">
1010
</HEAD>
1111
<BODY>
12-
<H1 align="center">CSS2 document tree</H1>
12+
<H1 align="center">Document tree and inheritance</H1>
1313
<H2>Document tree</H2>
14-
<em>To be written ...</em>
15-
<H2>Inheritance</H2>
14+
When a document written in the object language is parsed by a user
15+
agent, the result is a tree structure.
16+
17+
<div class="example"><P>
18+
For example, the following HTML document:
19+
<PRE>
20+
&lt;HTML&gt;
21+
&lt;TITLE&gt;My home page&lt;/TITLE&gt;
22+
&lt;BODY&gt;
23+
&lt;H1&gt;My home page&lt;/H1&gt;
24+
&lt;P&gt;Welcome to my home page! Let me tell you about my favorite
25+
composers:
26+
&lt;UL&gt;
27+
&lt;LI&gt; Elvis Costello
28+
&lt;LI&gt; Johannes Brahams
29+
&lt;LI&gt; Georges Brassens
30+
&lt;/UL&gt;
31+
&lt;/BODY&gt;
32+
&lt;/HTML&gt;
33+
</PRE>
34+
35+
<P> results in the following tree:</P>
36+
37+
<IMG src="images/doctree.gif">
38+
39+
<P>Notice that although the source program does not explicitly refer
40+
to the HEAD element, it is inferred during parsing and becomes part of
41+
the document tree.
42+
</div>
43+
44+
<!--
45+
<P>Notice in the previous example that the tree illustration does not
46+
refer to the text this program: the title text, the paragraph text, and
47+
the list item text.
48+
-->
49+
50+
<H2>Inheritance</H2>
51+
52+
<P>Elements inherit some property values from their ancestors in the
53+
document tree.
1654

1755
<div class="example"><P>
1856
Suppose there is an H1 element with an emphasized element inside:
@@ -32,12 +70,16 @@ class="propinst-font-size">'font-size'</span>.
3270

3371

3472
<P> To set a "default" style property for a document, one can set the
35-
property on an element from which all visible elements descend.
36-
73+
property on the root of the document tree. In HTML, the HTML or BODY
74+
elements can serve this function. This will work even if the author
75+
omits the BODY tag in the HTML source since the HTML parser will
76+
infer the missing tag.
3777

3878
<div class="example"><P>
39-
In HTML documents, for example, the BODY element can serve this
40-
function.
79+
80+
For example, the <span class="propinst-color">'color'</span> property
81+
on the BODY element is inherited by all descendents of the BODY
82+
element:
4183

4284
<PRE>
4385
BODY {
@@ -46,36 +88,23 @@ function.
4688
}
4789
</PRE>
4890

49-
<P> This will work even if the author has omitted the BODY tag
50-
(which is legal) since the HTML parser will infer the missing tag. The
51-
example above sets the text color to be black and the background to be
52-
an image. The background will be white if the image is not
53-
available. (See the section on <a href="./colors.html#backgrounds">
54-
backgrounds</a> for more information).
91+
<P> In this example, all descendents of the BODY element inherit the
92+
<span class="propinst-color">'color'</span> property.
5593
</div>
5694

95+
<P> Not all style properties are inherited. For example, the <span
96+
class="propinst-background">'background'</span> property is not
97+
inherited. However, by default, when an element has no explicit
98+
background, its parent's background shines through.
5799

58-
<P> Some style properties are not inherited from the parent element to
59-
the child element. Most often it is intuitive why this is not the
60-
case, e.g., the <span class="propinst-background">'background'</span>
61-
property does not inherit, but the parent element's background will
62-
shine through by default.
63-
64-
<P> Often, the value of a property is a percentage that refers to
65-
another property. The property definition clearly statues what
66-
property value the percentage refers to.
67-
68-
<div class="example"><P>
69-
For example, Children elements of P will inherit the
70-
computed value of <span class="propinst-line-height">'line-height'</span>
71-
(i.e., 12pt), not the percentage (see
72-
the <span class="index-inst" title="&lt;percentage&gt;"><span class="value-inst-percentage">&lt;percentage&gt;</span></span>value).
73-
74-
<PRE>
75-
P { font-size: 10pt }
76-
P { line-height: 120% } /* relative to 'font-size', i.e. 12pt */
77-
</PRE>
78-
</div>
100+
Thus, in the example above, the <span
101+
class="propinst-background">'background'</span> property on the BODY
102+
element, although not inherited, establishes the background of the
103+
entire document. The background will be white if the image is not
104+
available (see the section on <a href="./colors.html#backgrounds">
105+
backgrounds</a> for more information).
79106

107+
<P>Each property definition indicates whether the property is
108+
inherited by child elements.
80109
</BODY>
81110
</html>

css2/visuren.src

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40/sgml/HTML4.dtd">
22
<html lang="en">
3-
<!-- $Id: visuren.src,v 1.9 1997-08-14 23:43:51 bbos Exp $ -->
3+
<!-- $Id: visuren.src,v 1.10 1997-08-21 20:41:38 ian Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Visual flow model</TITLE>
@@ -338,7 +338,8 @@ replaced and block elevel elements.
338338
<DIV class="propdef">
339339
<H4 class=propname>
340340
<a name="propdef-margin">
341-
<span class="index-def" title="'margin', definition of">
341+
<span class="index-def" title="'margin',
342+
definition of|shorthand, 'margin'">
342343
'margin'</span></a></H4>
343344
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>margin</TR>
344345
<TR><TH align="right">Value:<TD>[<span class="index-inst" title="&lt;margin-width&gt;"><span class="value-inst-margin-width">&lt;margin-width&gt;</span></span>]{1,4}</TR>
@@ -504,7 +505,8 @@ refer to the the width of the youngest block level ancestor.
504505
<DIV class="propdef">
505506
<H4 class=propname>
506507
<a name="propdef-padding">
507-
<span class="index-def" title="'padding', definition of">
508+
<span class="index-def" title="'padding',
509+
definition of|shorthand, 'padding'">
508510
'padding'</span></a></H4>
509511
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>padding</TR>
510512
<TR><TH align="right">Value:<TD>[
@@ -668,7 +670,8 @@ class="value-inst-border-width">&lt;border-width&gt;</span></span></TR>
668670
<DIV class="propdef">
669671
<H4 class=propname>
670672
<a name="propdef-border-width">
671-
<span class="index-def" title="'border-width', definition of">
673+
<span class="index-def" title="'border-width',
674+
definition of|shorthand, 'border-width'">
672675
'border-width'</span></a></H4>
673676
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>border-width</TR>
674677
<TR><TH align="right">Value:<TD>
@@ -838,7 +841,8 @@ href="conformance.html">conformance</a> for details.
838841
<DIV class="propdef">
839842
<H4 class=propname>
840843
<a name="propdef-border-top">
841-
<span class="index-def" title="'border-top', definition of">
844+
<span class="index-def" title="'border-top',
845+
definition of|shorthand, 'border-top'">
842846
'border-top'</span></a></H4>
843847
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>border-top</TR>
844848
<TR><TH align="right">Value:<TD>
@@ -879,7 +883,8 @@ up to four values, this property only accepts one style value.
879883
<DIV class="propdef">
880884
<H4 class=propname>
881885
<a name="propdef-border-bottom">
882-
<span class="index-def" title="'border-bottom', definition of">
886+
<span class="index-def" title="'border-bottom',
887+
definition of|shorthand, 'border-bottom'">
883888
'border-bottom'</span></a></H4>
884889
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>border-bottom</TR>
885890
<TR><TH align="right">Value:<TD>
@@ -900,7 +905,8 @@ color of an element's right border. It behaves just like <span
900905
<DIV class="propdef">
901906
<H4 class=propname>
902907
<a name="propdef-border-right">
903-
<span class="index-def" title="'border-right', definition of">
908+
<span class="index-def" title="'border-right',
909+
definition of|shorthand, 'border-right'">
904910
'border-right'</span></a></H4>
905911
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>border-right</TR>
906912
<TR><TH align="right">Value:<TD>
@@ -921,7 +927,8 @@ color of an element's right border. It behaves just like <span
921927
<DIV class="propdef">
922928
<H4 class=propname>
923929
<a name="propdef-border-left">
924-
<span class="index-def" title="'border-left', definition of">
930+
<span class="index-def" title="'border-left',
931+
definition of|shorthand, 'border-left'">
925932
'border-left'</span></a></H4>
926933
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>border-left</TR>
927934
<TR><TH align="right">Value:<TD>
@@ -940,7 +947,8 @@ color of an element's left border. It behaves just like <span
940947
<DIV class="propdef">
941948
<H4 class=propname>
942949
<a name="propdef-border">
943-
<span class="index-def" title="'border', definition of">
950+
<span class="index-def" title="'border',
951+
definition of|shorthand, 'border'">
944952
'border'</span></a></H4>
945953
<TABLE class="propinfo"><TR><TH align="right">Property name:<TD>border</TR>
946954
<TR><TH align="right">Value:<TD>

0 commit comments

Comments
 (0)