Skip to content

Commit 694ec57

Browse files
committed
[css2] Started processing Steven P's comments. Better explanations, new
illustrations. --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401131
1 parent a5ed0df commit 694ec57

9 files changed

Lines changed: 330 additions & 288 deletions

File tree

css2/Makefile

Lines changed: 4 additions & 4 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 2.14 1998-03-09 12:39:11 bbos Exp $
3+
# $Id: Makefile,v 2.15 1998-03-10 18:43:58 bbos Exp $
44

55
# what needs to be set for every new release:
66
# Note use of full year (1998) in identifier.
@@ -201,10 +201,10 @@ HTML2PS= $(PERL) bin/html2ps -d -f html2psrc
201201
#PSTOPNM = ./bin/mypstopnm -r 75
202202
PSTOPNM = ./bin/mypstopnm -r 150
203203
#PNMTOGIF_PIPE = ppmquant 256 | ppmtogif
204-
PNMTOGIF_PIPE = pnmscale 0.5 | pnmgamma 1.8 | ppmquant -fs 256 | ppmtogif
204+
PNMTOGIF_PIPE = pnmscale 0.5 | pnmgamma 1.7 | ppmquant -fs 256 | ppmtogif
205205

206206
# idraw -> png
207-
PNMTOPNG_PIPE = pnmscale 0.5 | pnmgamma 1.8 | pnmtopng -gamma 1.8
207+
PNMTOPNG_PIPE = pnmscale 0.5 | pnmgamma 1.7 | pnmtopng -gamma 1.7
208208

209209
# include paths
210210
INCLUDES= -Ibuild -I.
@@ -257,7 +257,7 @@ all: build/blocks.ok $(SPECOBJS) $(INDEXES) \
257257

258258

259259
images/links.ok : $(IMAGES)
260-
-@(cd images; for i in *.gif; do $(LN) -s $$i "`basename $$i .gif`" 2&> /dev/null; done)
260+
-@(cd images; for i in *.gif; do $(LN) -s $$i "`basename $$i .gif`" 2>//dev/null; done)
261261
touch images/links.ok
262262

263263
install: all css2.tgz

css2/conform.src

Lines changed: 137 additions & 101 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.15 1998-03-10 09:36:13 bbos Exp $ -->
3+
<!-- $Id: conform.src,v 2.16 1998-03-10 18:44:13 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Conformance: requirements and recommendations</TITLE>
@@ -11,8 +11,7 @@
1111
<H2>Definitions</H2>
1212

1313
<p> In this section, we begin the formal specification of CSS2,
14-
starting with the contract between authors, documents, users, and user
15-
agents.
14+
starting with the contract between authors, users, and implementers.
1615

1716
<P>The key words <span class="index-def" title="MUST">"MUST"</span>,
1817
<span class="index-def" title="MUST NOT">"MUST NOT"</span>, <span
@@ -28,108 +27,140 @@ are to be interpreted as described in RFC&nbsp;2119 (see [[RFC2119]]).
2827
However, for readability, these words do not appear in all uppercase
2928
letters in this specification.
3029

31-
<P>At times, the authors of this specification recommend good practice
30+
<P>At times, this specification recommends good practice
3231
for authors and user agents. These recommendations are not normative
3332
and conformance with this specification does not depend on their
3433
realization. These recommendations contain the expression "We
3534
recommend ...", "This specification recommends ...", or some similar
3635
wording.</P>
3736

3837
<dl>
39-
<dt><dfn><strong><span class="index-def" title="style sheet">Style
40-
sheet</span></strong></dfn>
41-
<dd>A set of statements that specify
42-
presentation of a document.
38+
<dt><strong><span class="index-def" title="style sheet">Style
39+
sheet</span></strong>
40+
41+
<dd>A set of statements that specify presentation of a document.
4342

4443
<P>Style sheets may have three different origins: <a
4544
href="#author">author</a>, <a href="#user">user</a>, and <a
4645
href="#user-agent">user agent</a>. The interaction of these sources is
4746
described in the section on <a href="cascade.html">cascading and
4847
inheritance</a>.
4948

50-
<dt><dfn><strong><a name="valid-style-sheet">Valid style sheet</a></strong></dfn></dt>
51-
<dd>The <span class="index-def" title="valid style sheet">validity</span>
52-
of a style sheet depends on the level of CSS used for the style sheet.
53-
All valid level N-1 style sheets are valid level N style sheets. In
54-
particular, all valid CSS1 style sheets are valid CSS2 style sheets.
55-
A valid CSS2 style sheet must respect the <a
56-
href="grammar.html">grammar of CSS2</a> and the <a
57-
href="selector.html">selector syntax</a>. Furthermore, it must
58-
contain only at-rules, property names, and property values defined in this
49+
<dt><strong><a name="valid-style-sheet">Valid style sheet</a></strong>
50+
51+
<dd>The <span class="index-def" title="valid style
52+
sheet">validity</span> of a style sheet depends on the level of CSS
53+
used for the style sheet. All valid CSS1 style sheets are valid CSS2
54+
style sheets. A valid CSS2 style sheet must respect the <a
55+
href="grammar.html">grammar of CSS2</a>. Furthermore, it must contain
56+
only at-rules, property names, and property values defined in this
5957
specification. An <span class="index-def"
60-
title="illegal"><dfn>illegal</dfn></span> or invalid
61-
at-rule, property name, or property value is one that is not valid.
62-
63-
<dt><dfn><strong><span class="index-def" title="source
64-
document">Source document</span></strong></dfn>
65-
<dd>The document to which one or more style sheets refer.</dd>
66-
67-
<dt><dfn><strong><span class="index-def" title="document language"><a
68-
name="doclanguage">Document language</a></span></strong></dfn>
69-
<dd>The computer language of the source
70-
document (e.g., HTML, XML, etc.).
71-
72-
<P>The primary syntactic constructs of the document language are
73-
called <span class="index-def"
74-
title="element"><em>elements</em></span> (an SGML term, see [[ISO8879]]). Most CSS style sheet rules refer to
75-
these elements and specify rendering information for them. Examples
76-
of elements in HTML include "P" (for paragraphs), "TABLE"
77-
(for marking-up tables), "OL" (for marking-up ordered lists), etc.
78-
79-
<P>The <span class="index-def" title="element::content"> <a
80-
name="element-content"><dfn>content</dfn></a></span> of an element is
81-
the content of that element in the source document; not all elements
82-
have content. The <span class="index-def" title="element::rendered
83-
content"> <a name="rendered-content"><dfn>rendered
84-
content</dfn></a></span> of an element is the content actually
85-
rendered. An element's content is generally its rendered content. The
86-
rendered content of a <span class="index-def" title="replaced
87-
element"><a name="replaced-element"><dfn>replaced
88-
element</dfn></a></span> comes from outside the source document (e.g.,
89-
HTML's IMG element).
90-
Rendered content may also be <span class="index-def" title="alternate
91-
text"> <a name="alternate-text"><dfn>alternate text</dfn></a></span>
92-
for an element (e.g., the value of the HTML "alt" attribute).
93-
94-
<dt><dfn><strong><span class="index-def" title="document tree"><a
95-
name="doctree">Document tree</a></span></strong></dfn></dt>
96-
<dd>User agents transform a document written in the document language
97-
into a <dfn>document tree</dfn> where every element except one has
98-
exactly one <span class="index-def" title="parent">parent</span>
99-
element. (See the SGML specification for the definition of parent
100-
([[ISO8879]]).) The one exception is the <span class="index-def"
101-
title="root"><dfn>root</dfn></span> element, which has no parent.
102-
103-
<P>An element A is called an <span class="index-def"
104-
title="ancestor"><dfn>ancestor</dfn></span> of an element B, if either
105-
(1) A is the parent B, or (2) A is the parent of some element C that
106-
is an ancestor of B.
107-
108-
<P>An element A is called a <span class="index-def"
109-
title="descendant"><dfn>descendant</dfn></span> of an element B, if
110-
and only if B is an ancestor of A. An element A is called a <span
111-
class="index-def" title="child">child</span> of an element B, if and
112-
only if B is the parent of A.
113-
114-
<P>An element A is called a <span class="index-def"
115-
title="sibling"><dfn>sibling</dfn></span> of an element B, if and only
116-
if B and A share the same parent element. Element A is a preceding
117-
sibling if it comes before B in the document tree. Element B is a
118-
following sibling if it comes after A in the document tree.
119-
120-
<P>An element A is called a <span class="index-def" title="preceding
121-
element"><a name="preceding"><dfn>preceding element</dfn></a></span>
122-
of an element B, if and only if (1) A is an ancestor of B or (2) A is
123-
a preceding sibling of B. An element A is called a <span
124-
class="index-def" title="following element"><a
125-
name="following"><dfn>following element</dfn></a></span> of an element
126-
B, if and only if (1) A is an descendant of B or (2) A is a following
127-
sibling of B.
128-
129-
130-
131-
<div class="html-example"><P>
132-
For example, the following HTML document:
58+
title="illegal"><strong>illegal</strong></span> or invalid at-rule,
59+
property name, or property value is one that is not valid.
60+
61+
<dt><strong><span class="index-def" title="source document">Source
62+
document</span></strong>
63+
64+
<dd>The document to which one or more style sheets refer. This is
65+
encoded in some language that represents the document as a tree of <a
66+
href="#element">elements</a>. Each element consists of a name that
67+
identifies the type of element, optionally a number of <a
68+
href="#attribute">attributes</a>, and a (possibly empty) <a
69+
href="#content">content</a>.</dd>
70+
71+
<dt><strong><span class="index-def" title="document language"><a
72+
name="doclanguage">Document language</a></span></strong>
73+
74+
<dd>The encoding language of the source document (e.g., HTML, XML,
75+
etc.).
76+
77+
<dt><strong><span class="index-def" title="element"><a
78+
name="element">Element</a></span></strong>
79+
80+
<dd>(An SGML term, see [[ISO8879]].) The primary syntactic constructs
81+
of the document language. Most CSS style sheet rules use the names of
82+
these elements (such as "P", "TABLE" and "OL" for HTML) to specify
83+
rendering information for them.
84+
85+
<dt><strong><span class="index-def" title="attribute"><a
86+
name="attribute">Attribute</a></span></strong>
87+
88+
<dd>A value associated with an element, consisting of a name, and an
89+
associated (textual) value.
90+
91+
<dt><strong><span class="index-def" title="content"><a
92+
name="content">Content</a></span></strong>
93+
94+
<dd>The content associated with an element in the source document; not
95+
all elements have content in which case they are called <strong><span
96+
class="index-def" title="empty">empty</span></strong>. The content of
97+
an element may include text, and it may include a number of
98+
sub-elements, in which case the element is called the <strong><span
99+
class="index-def" title="parent">parent</span></strong> of those
100+
sub-elements.
101+
102+
<dt><strong><span class="index-def" title="rendered
103+
content|content::rendered">Rendered content</span></strong>
104+
105+
<dd>The content of an element after the rendering that applies to it
106+
according to the relevant style sheets has been applied. The rendered
107+
content of a replaced element may come from outside the source
108+
document (e.g., HTML's IMG element). Rendered content may also be
109+
alternate text for an element (e.g., the value of the HTML "alt"
110+
attribute), and may include items inserted implicitely or explicitely
111+
by the style sheet, such as bullets, numbering, etc.
112+
113+
<dt><strong><span class="index-def" title="document tree">Document
114+
tree</span></strong>
115+
116+
<dd>The tree of elements encoded in the source document. Each element
117+
in this tree has exactly one parent, with the exception of the
118+
<strong><span class="index-def" title="root">root</span></strong>
119+
element, which has none.
120+
121+
<dt><strong><span class="index-def"
122+
title="child">Child</span></strong>
123+
124+
<dd>An element A is called the child of element B if an only if B is
125+
the parent of A.
126+
127+
<dt><strong><span class="index-def"
128+
title="descendant">Descendant</span></strong>
129+
130+
<dd>An element A is called a descendant of an element B, if either (1)
131+
A is a child of B, or (2) A is the child of some element C that is a
132+
descendant of B.
133+
134+
<dt><strong><span class="index-def"
135+
title="ancestor">Ancestor</span></strong>
136+
137+
<dd>An element A is called an ancestor of an element B, if and only if
138+
B is a descendant of A.
139+
140+
<dt><strong><span class="index-def"
141+
title="sibling">Sibling</span></strong>
142+
143+
<dd>An element A is called a sibling of an element B, if and only if B
144+
and A share the same parent element. Element A is a preceding sibling
145+
if it comes before B in the document tree. Element B is a following
146+
sibling if it comes after B in the document tree.
147+
148+
<dt><strong><span class="index-def" title="preceding
149+
element|element::preceding">Preceding element</span></strong>
150+
151+
<dd>An element A is called a preceding element of an element B, if and
152+
only if (1) A is an ancestor of B or (2) A is a preceding sibling of
153+
B.
154+
155+
<dt><strong><span class="index-def" title="following
156+
element|element::following">Following element</span></strong>
157+
158+
<dd>An element A is called a following element of an element B, if and
159+
only if B is a preceding element of A.
160+
161+
<div class="html-example">
162+
<p>Here is an example of a source document encoded in HTML:
163+
133164
<PRE>
134165
&lt;HTML&gt;
135166
&lt;TITLE&gt;My home page&lt;/TITLE&gt;
@@ -146,20 +177,23 @@ For example, the following HTML document:
146177
&lt;/HTML&gt;
147178
</PRE>
148179

149-
<P>results in the following tree:</P>
180+
<P>This results in the following tree:</P>
150181

151182
<P><IMG src="images/doctree.gif" alt="Sample document tree"></p>
152183

153184
<P>According to the definition of HTML, HEAD elements will be inferred
154185
during parsing and become part of the document tree even if the HEAD
155-
tags are not in the document source.
186+
tags are not in the document source. Similarly, the parser knows where
187+
the P and LIs end, even though there are no &lt;/P> and &lt;/LI> tags
188+
in the source.
156189
</div>
157190
</dd>
158191

192+
<!--
159193
<dt>
160194
<span class="index-def" title="anonymous content">
161195
<a name="anonymous">
162-
<dfn><strong>Anonymous content</strong></dfn></a>
196+
<strong><strong>Anonymous content</strong></strong></a>
163197
</span></dt>
164198

165199
<dd>At times, content either in the document tree or <a
@@ -171,20 +205,22 @@ to be "anonymous".
171205
<P><a href="selector.html#pseudo-elements">Pseudo-elements</a> allow
172206
authors to refer to what would otherwise be anonymous content.
173207

174-
<dt><dfn><strong><a name="author">Author</a></strong></dfn>
208+
[Removed, see visuren.html#anonymous instead. BB] -->
209+
210+
<dt><strong><strong><a name="author">Author</a></strong></strong>
175211
<dd>An author is a person who writes
176212
documents and associated style sheets. An
177-
<span class="index-def" title="authoring tool"><dfn>authoring tool</dfn></span>
213+
<span class="index-def" title="authoring tool"><strong>authoring tool</strong></span>
178214
generates documents and associated style sheets.</dd>
179215

180-
<dt><dfn><strong><a name="user">User</a></strong></dfn>
216+
<dt><strong><strong><a name="user">User</a></strong></strong>
181217
<dd> A user is a person who interacts with a user agent to view, hear, or
182218
otherwise use a document and its associated style sheet. The user
183219
may provide a personal style sheet that encodes personal
184220
preferences.
185221
</dd>
186222

187-
<dt><dfn><strong><a name="user-agent">User agent (UA)</a></strong></dfn>
223+
<dt><strong><strong><a name="user-agent">User agent (UA)</a></strong></strong>
188224
<dd>A <span class="index-def" title="user agent|UA">user
189225
agent</span> is any program that interprets a document written in
190226
the document language and applies associated style sheets according
@@ -290,10 +326,10 @@ name="text-css">The text/css content type</a></span></H2>
290326
Internet as a sequence of bytes accompanied by encoding information
291327
(see [[HTML40]], chapter 5). The structure of the transmission,
292328
termed a <span class="index-def" title="message entity"><a
293-
name="message-entity"><dfn>message entity,</dfn></a></span> is defined
294-
by RFC 2045 and RFC 2068 (see [[RFC2045]] and [[RFC2068]]). A message
295-
entity with a content type of "text/css" represents an independent CSS
296-
document.
329+
name="message-entity"><strong>message entity,</strong></a></span> is
330+
defined by RFC 2045 and RFC 2068 (see [[RFC2045]] and [[RFC2068]]). A
331+
message entity with a content type of "text/css" represents an
332+
independent CSS document.
297333

298334
<P>The text/css content type is defined in RFC ??? (see [[RFCCSS]]).
299335

css2/images/doctree.gif

-180 Bytes
Loading

0 commit comments

Comments
 (0)