Skip to content

Commit fa40156

Browse files
committed
[css2] Edits based on WG mail
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40694
1 parent 1abb469 commit fa40156

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

css2/selector.src

Lines changed: 21 additions & 14 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 1.49 1998-01-22 01:16:32 ijacobs Exp $ -->
3+
<!-- $Id: selector.src,v 1.50 1998-01-24 00:18:12 ijacobs Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<title>Selectors</title>
@@ -18,8 +18,9 @@ elements in the <a href="conform.html#doctree">document
1818
tree</a>. These patterns, called <span class="index-def"
1919
title="selectors"><em>selectors,</em></span> may range from simple
2020
element names to rich contextual patterns. If all conditions in the
21-
pattern are true for a certain element, the selector
22-
<dfn>matches</dfn> the element.
21+
pattern are true for a certain element, the selector <span
22+
class="index-def"
23+
title="match|selector::match"><dfn>matches</dfn></span> the element.
2324

2425
<P>The <span class="index-def" title="pattern
2526
subject"><dfn>subject</dfn></span> of the pattern is the rightmost
@@ -112,7 +113,7 @@ document tree:
112113
<p>At times, authors may want selectors to match an element that is
113114
the descendant of another element in the document tree (e.g., "Match
114115
those EM elements that are contained by an H1 element").
115-
<span class="index-def" title="descendant-selectors">descendant
116+
<span class="index-def" title="descendant-selectors">Descendant
116117
selectors</span> express such a relationship in a pattern.
117118
A descendant selector matches when an element B is an arbitrary
118119
descendant of some <a href="conform.html#doctree">ancestor</a> element
@@ -130,7 +131,7 @@ For example, consider the following rules:</p>
130131
<p>Although the intention of these rules is to add emphasis to text by
131132
changing its color, the effect will be lost in a case such as:</p>
132133

133-
<pre>
134+
<pre class="html-example">
134135
&lt;H1&gt;This headline is &lt;EM&gt;very&lt;/EM&gt; important&lt;/H1&gt;
135136
</pre>
136137

@@ -144,9 +145,9 @@ within an H1:</p>
144145
H1 EM { color: blue }
145146
</pre>
146147

147-
<p>The third rule will also match the EM in the following fragment:</p>
148+
<p>The third rule will match the EM in the following fragment:</p>
148149

149-
<pre>
150+
<pre class="html-example">
150151
&lt;H1&gt;This
151152
&lt;SPAN class="myclass"&gt;headline is &lt;EM&gt;very&lt;/EM&gt;
152153
important&lt;/SPAN&gt;&lt;/H1&gt;
@@ -195,12 +196,12 @@ are children of BODY:</p>
195196

196197
<p>Child selectors may be <a href="#grouping">grouped</a>. A child
197198
selector may also contain <a href="#attribute-selectors">attribute
198-
selectors</a>. Descendant selectors and child selectors may be
199-
combined.
199+
selectors</a>.
200200

201-
<div class="example"><P>
201+
<P>Descendant selectors and child selectors may be combined.
202202
For instance:
203203

204+
<div class="example"><P>
204205
<pre>
205206
DIV OL &gt; LI P
206207
</pre>
@@ -213,8 +214,8 @@ descendant of a DIV.
213214
<h3><a name="first-child">:first-child</a> pseudo-class</h3>
214215

215216
<P>The <span class="index-def" title="first-child">first-child</span>
216-
<a href="#pseudo-classes">pseudo-class</a> allows authors to match
217-
any element that is the first child of some other element.
217+
<a href="#pseudo-classes">pseudo-class</a> matches an element that is
218+
the first child of some other element.
218219

219220
<div class="example"><P>
220221
In the following example, the selector matches any P element
@@ -383,7 +384,7 @@ Here, the selector matches all SPAN elements whose
383384
The following rules illustrate the differences between "=" and "~=":</p>
384385
<pre>
385386
A[rel~="copyright"] {} /* matches, e.g., &lt;A rel="copyright copyleft ..." */
386-
td[colspan="2"] {} /* matches only &lt;TD colspan="2"&gt; ... */
387+
TD[colspan="2"] {} /* matches only &lt;TD colspan="2"&gt; ... */
387388
</pre>
388389
</div>
389390

@@ -498,6 +499,12 @@ an element instance based on its identifier.
498499
be called something else. The name of the ID attribute is immaterial
499500
for CSS.
500501

502+
<!-- Everyone has some complaints about the previous paragraph.
503+
Needs more explanation. For example,
504+
"Either say how one establishes
505+
which attribute is to play the ID role in creating items
506+
referenceable by #id syntax, or don't talk about it." -IJ -->
507+
501508
<p>A CSS "id" selector contains a "#" immediately followed by the "id"
502509
value.</p>
503510

@@ -824,7 +831,7 @@ considered within the :first-letter pseudo-element.
824831
</em></p>
825832
</div>
826833

827-
<div class="overlapping-example"><p>
834+
<div id="overlapping-example" class="example"><p>
828835
The following example illustrates how overlapping pseudo-elements may
829836
interact. The first letter of each P element will be green with a
830837
font size of '24pt'. The rest of the first formatted line will be

0 commit comments

Comments
 (0)