Skip to content

Commit b4b28ab

Browse files
committed
[css2] Edits as per Aug ftf
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401956
1 parent 54efc2f commit b4b28ab

4 files changed

Lines changed: 76 additions & 40 deletions

File tree

css2/box.src

Lines changed: 14 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: box.src,v 1.26 2002-08-19 14:50:23 bbos Exp $ -->
3+
<!-- $Id: box.src,v 1.27 2002-09-13 23:40:54 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Box model</TITLE>
@@ -265,7 +265,8 @@ body {
265265

266266
<P>In this specification, the expression <span class="index-def"
267267
title="collapsing margin"><dfn>collapsing margins</dfn></span> means
268-
that adjoining margins (no padding or border areas separate them) of
268+
that adjoining margins (no non-empty content, padding or border areas
269+
separate them) of
269270
two or more boxes (which may be next to one another or nested) combine
270271
to form a single margin.
271272

@@ -293,10 +294,20 @@ collapse.
293294

294295
<li>Margins of <a
295296
href="visuren.html#absolutely-positioned">absolutely</a> and
296-
relatively positioned boxes do not collapse.
297+
relatively positioned boxes do not collapse (not even with their
298+
in-flow children).
297299

298300
</ul>
299301

302+
<p>Collapsing is based on the <em>computed value</em> of <span
303+
class="propinst-padding">'padding'</span>, <span
304+
class="propinst-margin">'margin'</span>, <span
305+
class="propinst-border">'border'</span> and <span
306+
class="propinst-height">'height'</span>: content is empty if its
307+
height is zero, padding and border are absent if their width is zero,
308+
and the collapsed margin is calculated over the computed value of the
309+
various margins.
310+
300311
<P>Please
301312
consult the <a href="#mpb-examples">examples of margin, padding, and
302313
borders</a> for an illustration of collapsed margins.

css2/cascade.src

Lines changed: 3 additions & 4 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.37 2002-08-02 17:35:12 bbos Exp $ -->
3+
<!-- $Id: cascade.src,v 2.38 2002-09-13 23:40:54 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>
@@ -389,9 +389,7 @@ a=1, b=0, c=0, and d=0.)
389389
<li>count the number of other attributes and pseudo-classes
390390
in the selector (= c)
391391

392-
<li>count the number of element names in the selector (= d)
393-
394-
<li>ignore pseudo-elements.
392+
<li>count the number of element names and pseudo-elements in the selector (= d)
395393
</ul>
396394

397395
<P>Concatenating the four numbers a-b-c-d (in a number system with a large
@@ -403,6 +401,7 @@ Some examples:
403401
<PRE>
404402
* {} /* a=0 b=0 c=0 d=0 -&gt; specificity = 0,0,0,0 */
405403
li {} /* a=0 b=0 c=0 d=1 -&gt; specificity = 0,0,0,1 */
404+
li:first-line {} /* a=0 b=0 c=0 d=1 -&gt; specificity = 0,0,0,2 */
406405
ul li {} /* a=0 b=0 c=0 d=2 -&gt; specificity = 0,0,0,2 */
407406
ul ol+li {} /* a=0 b=0 c=0 d=3 -&gt; specificity = 0,0,0,3 */
408407
h1 + *[rel=up]{} /* a=0 b=0 c=1 d=1 -&gt; specificity = 0,0,1,1 */

css2/refs.src

Lines changed: 27 additions & 1 deletion
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: refs.src,v 2.16 2002-08-02 17:45:39 bbos Exp $ -->
3+
<!-- $Id: refs.src,v 2.17 2002-09-13 23:40:54 bbos Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Bibliography</TITLE>
@@ -171,12 +171,32 @@ charset values from <A
171171
href="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">
172172
ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</A>. </DD>
173173

174+
<dt><strong><a name="ref-CSS3SEL"
175+
class="informref">[CSS3SEL]</a></strong> <dd>"Selectors", D. Glazman,
176+
T. �elik, I. Hickson, 13 November 2001<br>
177+
Available at <a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/">
178+
http://www.w3.org/TR/2001/CR-css3-selectors-20011113</a>
179+
174180
<dt><strong><a name="ref-DOM" class="informref">[DOM]</a></strong>
175181
<dd>"Document Object Model Specification", L. Wood, A. Le Hors,
176182
9 October 1997.<BR>
177183
Available at <a href="http://www.w3.org/TR/WD-DOM/">
178184
http://www.w3.org/TR/WD-DOM/</a>
179185

186+
<dt><strong><a name="ref=MATH20"
187+
class="informref">[MATH20]</a></strong> <dd>"Mathematical Markup
188+
Language (MathML) Version 2.0", D. Carlisle, P. Ion, R. Miner, N.
189+
Poppelier, 21 February 2001<br>
190+
Available at <a href="http://www.w3.org/TR/2001/REC-MathML2-20010221/">
191+
http://www.w3.org/TR/2001/REC-MathML2-20010221</a>
192+
193+
<dt><strong><a name="ref-P3P" class="informref">[P3P]</a></strong>
194+
<dd>"The Platform for Privacy Preferences 1.0 (P3P1.0) Specification",
195+
L. Cranor, M. Langheinrich, M. Marchiori, M. Presler-Marshall,
196+
J. Reagle, 16 April 2002<br>
197+
Available at <a href="http://www.w3.org/TR/2002/REC-P3P-20020416/">
198+
http://www.w3.org/TR/2002/REC-P3P-20020416</a>
199+
180200
<DT><STRONG><A name="ref-RFC1766"
181201
class="informref">[RFC1766]</A></STRONG></DT>
182202

@@ -185,6 +205,12 @@ March 1995.<BR>
185205
Available at <A href="http://www.ietf.org/rfc/rfc1766.txt">
186206
http://www.ietf.org/rfc/rfc1766.txt</A>. </DD>
187207

208+
<dt><strong><a name="ref-SVG10" class="informref">[SVG10]</a></strong>
209+
<dd>"Scalable Vector Graphics (SVG) 1.0 Specification", J. Ferraiolo,
210+
4 September 2001<br>
211+
Available at <a href="http://www.w3.org/TR/2001/REC-SVG-20010904/">
212+
http://www.w3.org/TR/2001/REC-SVG-20010904</a>
213+
188214
<dt><strong><a name="ref-WAI-PAGEAUTH"
189215
class="informref">[WAI-PAGEAUTH]</a></strong>
190216
<dd>"Web Content Accessibility Guidelines", W. Chisholm,

css2/selector.src

Lines changed: 32 additions & 32 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.65 2002-08-02 17:45:39 bbos Exp $ -->
3+
<!-- $Id: selector.src,v 2.66 2002-09-13 23:40:54 bbos Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<title>Selectors</title>
@@ -72,7 +72,8 @@ which is exactly equal to "warning".
7272
beginning (from the left) with "en".
7373
<TD><a href="#attribute-selectors">Attribute selectors</a>
7474
</TR>
75-
<TR><TD>DIV.warning<TD><em>HTML only</em>. The same as DIV[class~="warning"].
75+
<TR><TD>DIV.warning<TD><em>Language specific.</em> (In HTML, the same
76+
as DIV[class~="warning"].)
7677
<TD><a href="#class-html">Class selectors</a></TR>
7778
<TR><TD>E#myid<TD>Matches any E element ID
7879
equal to "myid".<TD><a href="#id-selectors">ID selectors</a></TR>
@@ -90,6 +91,11 @@ selectors</a>, <a href="#id-selectors">ID selectors</a>, or <a
9091
href="#pseudo-classes">pseudo-classes</a>, in any order. The simple
9192
selector matches if all of its components match.
9293

94+
<p class="note">Note: the terminology used here in CSS&nbsp;2.1 is
95+
different from what is used in CSS3. For example, a "simple selector"
96+
refers to a smaller part of a selector in CSS3 than in CSS&nbsp;2.1.
97+
See the CSS3 Selectors module [[-CSS3SEL]].
98+
9399
<P>A <span class="index-def"
94100
title="selector"><dfn>selector</dfn></span> is a chain of one or more
95101
simple selectors separated by combinators. <span class="index-def"
@@ -470,11 +476,23 @@ that don't get the same style as the default are explicitly covered.
470476

471477
<h3><a name="class-html">Class selectors</a></h3>
472478

473-
<p>For style sheets used with HTML, authors may use the dot (.)
474-
notation as an alternative to the "~=" notation when matching on the
475-
"class" attribute. Thus, for HTML,
476-
"DIV.value" and "DIV[class~=value]" have the same meaning. The
477-
attribute value must immediately follow the ".".
479+
<p>Working with HTML, authors may use the period (<code>.</code>)
480+
notation as an alternative to the <code>~=</code> notation when
481+
representing the <code>class</code> attribute. Thus, for HTML,
482+
<code>div.value</code> and <code>div[class~=value]</code> have the
483+
same meaning. The attribute value must immediately follow the
484+
&quot;period&quot; (<code>.</code>). UAs may apply selectors using the
485+
period (.) notation in XML documents if the UA has namespace specific
486+
knowledge that allows it to determine which attribute is the
487+
&quot;class&quot; attribute for the respective namespace. One such
488+
example of namespace specific knowledge is the prose in the
489+
specification for a particular namespace (e.g. SVG 1.0 [[-SVG10]]
490+
describes the <a
491+
href="http://www.w3.org/TR/2001/REC-SVG-20010904/styling.html#ClassAttribute">SVG
492+
&quot;class&quot; attribute</a> and how a UA should interpret it, and
493+
similarly MathML 2.0 [[-MATH20]] describes the <a
494+
href="http://www.w3.org/TR/MathML2/chapter2.html#fund_globatt">MathML
495+
&quot;class&quot; attribute</a>.)
478496

479497
<div class="example"><p>
480498
For example, we can assign style information to all elements with
@@ -795,6 +813,13 @@ a.external:visited { color: blue }
795813
will cause it to be blue.
796814
</div>
797815

816+
<p class=note>Note. It is possible for stylesheet authors to abuse the
817+
:link and :visited pseudo-classes to determine which sites a user has
818+
visited without the user's consent. UAs may therefore treat all links
819+
as unvisited links, or implement other measures to preserve the user's
820+
privacy while rendering visited and unvisited links differently. See
821+
[[-P3P]] for more information about handling privacy.
822+
798823
<h3><a name="dynamic-pseudo-classes">The dynamic pseudo-classes:</a>
799824
<span class="index-def" title="pseudo-classes:::hover|:hover|hover
800825
(pseudo-class)">:hover</span>, <span class="index-def"
@@ -1030,31 +1055,6 @@ class="propinst-text-transform">'text-transform',</span> <span
10301055
class="propinst-line-height">'line-height',</span> and <span
10311056
class="propinst-clear">'clear'.</span></p>
10321057

1033-
<p>In case a certain first line is the first line of some
1034-
block-level element <var>A</var> as well as of <var>A</var>'s ancestor
1035-
<var>B </var>, the fictional tag sequence is as follows:
1036-
1037-
<pre>&lt;B&gt;...&lt;A&gt;...&lt;B:first-line&gt;&lt;A:first-line&gt;This is the first line&lt;/A:first-line&gt;&lt;/B:first-line&gt;</pre>
1038-
1039-
<p>All fictional tags for first-line are inside the smallest enclosing
1040-
block-level element and the nesting order of the fictional tags
1041-
A:first-line and B-first-line is the same as that of the elements
1042-
<var>A</var> and <var>B </var>.
1043-
1044-
<p>The "first formatted line" of a block level element is the first
1045-
line in the element's flow, i.e., ignoring any floats or absolutely
1046-
positioned elements. For example, in
1047-
1048-
<pre>
1049-
&lt;div&gt;
1050-
&lt;p style="float: left"&gt;Floating paragraph...&lt;/p&gt;
1051-
&lt;p&gt;First line starts here...&lt;/p&gt;
1052-
&lt;/div&gt;
1053-
</pre>
1054-
1055-
<p>The selector 'div:first-line' applies to the first line of the
1056-
second p, because the first p is taken out of the flow.
1057-
10581058

10591059
<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>
10601060

0 commit comments

Comments
 (0)