Skip to content

Commit b7fe704

Browse files
committed
[css2] Some selector syntax rewrites (done with Hakon), removed a comment, fixed a link
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401328
1 parent 1a5064b commit b7fe704

1 file changed

Lines changed: 20 additions & 33 deletions

File tree

css2/selector.src

Lines changed: 20 additions & 33 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.36 1998-03-21 23:53:06 bbos Exp $ -->
3+
<!-- $Id: selector.src,v 2.37 1998-03-22 02:04:43 ijacobs Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<title>Selectors</title>
@@ -29,9 +29,9 @@ case-sensitive.
2929
<TR><TH>Pattern<TH>Meaning<TH>Described in section</TR>
3030
<TR><TD>*<TD>Matches any element.<TD><a href="#universal-selector">Universal
3131
selector</a></TR>
32-
<TR><TD>E<TD>Matches any E element (i.e. an element of type E).<TD><a href="#type-selectors">Type
32+
<TR><TD>E<TD>Matches any E element (i.e., an element of type E).<TD><a href="#type-selectors">Type
3333
selectors</a></TR>
34-
<TR><TD>A F<TD>Matches any E element that is a descendant of
34+
<TR><TD>E F<TD>Matches any E element that is a descendant of
3535
an F element.<TD><a href="#descendant-selectors">Descendant
3636
selectors</a></TR>
3737
<TR><TD>E &gt; F<TD>Matches any F element that is a child of
@@ -81,34 +81,32 @@ equal to "myid".<TD><a href="#id-selectors">ID selectors</a></TR>
8181
<h2>Selector syntax</h2>
8282

8383
<P>A <span class="index-def" title="simple selector"><a
84-
name="simple-selector"><dfn>simple selector</dfn></a></span> may
85-
consist of several components with no intervening whitespace: one <a
86-
href="#type-selectors">type selector</a> or <a
87-
href="#universal-selector">universal selector</a> followed by zero or
88-
more <a href="#attribute-selectors">attribute selectors</a>, <a
89-
href="#id-selectors">ID selectors</a>, and <a
90-
href="#pseudo-classes">pseudo-classes</a>. The universal selector may
91-
be omitted, unless it is the only component. Each component specifies
92-
a requirement of an element, and an element matches the simple
93-
selector if it matches all of the components.
84+
name="simple-selector"><dfn>simple selector</dfn></a></span> is either
85+
a <a href="#type-selectors">type selector</a> or <a
86+
href="#universal-selector">universal selector</a> followed immediately
87+
by zero or more <a href="#attribute-selectors">attribute
88+
selectors</a>, <a href="#id-selectors">ID selectors</a> or <a
89+
href="#pseudo-classes">pseudo-classes</a>, in any order. The simple
90+
selector matches if all of its components match.
9491

9592
<P>A <span class="index-def"
9693
title="selector"><dfn>selector</dfn></span> is a chain of one or more
97-
simple selectors, separated by whitespace and/or a combinator (">" or
98-
"+"). The combinator indicates a relation between the simple selectors
99-
on either side. The elements of the document tree that match a
100-
selector are called <span class="index-def" title="subject (of
101-
selector)|selector::subject of"><a
102-
name="subject"><dfn>subjects</dfn></a></span> of the selector. A
103-
selector consisting of a single simple selector matches any element
94+
simple selectors separated by combinators. Combinators are:
95+
whitespace, "&gt;", and "+". Whitespace may appear between a
96+
combinator and the simple selectors around it.
97+
98+
<P>The elements of the document tree that match a selector are called
99+
<span class="index-def" title="subject (of selector)|selector::subject
100+
of"><a name="subject"><dfn>subjects</dfn></a></span> of the selector.
101+
A selector consisting of a single simple selector matches any element
104102
satisfying its requirements. Prepending a simple selector and
105103
combinator to a chain imposes additional matching constraints, so the
106104
subjects of a selector are always a subset of the elements matching
107105
the rightmost simple selector.
108106

109107
<P>One <a href="#pseudo-elements">pseudo-element</a> may be appended
110108
to the last simple selector in a chain, in which case the style
111-
information applies to a subpart of the subjects.
109+
information applies to a subpart of each subject.
112110

113111
<h3><a name="grouping">Grouping</a></h3>
114112

@@ -275,7 +273,7 @@ pseudo-class below.
275273
appear next to each other in a document. For example, when block-level
276274
elements are laid out, the vertical space between them collapses. In
277275
this case, the special formatting is handled by the rules for <a
278-
href="./visudet.html#collapsing-margins">collapsing margins</a>, but
276+
href="./box.html#collapsing-margins">collapsing margins</a>, but
279277
in other cases of adjacent selectors, authors may want to specify
280278
their own special formatting rules.</p>
281279

@@ -608,9 +606,6 @@ an "!important" priority to the declarations: <code>[name=p371]
608606
without a DTD do not have IDs at all.</em>
609607
</div>
610608

611-
<!-- What to do if no DTD? -IJ -->
612-
613-
614609
<h2><a name="pseudo-elements">Pseudo-elements</a> and <a
615610
name="pseudo-classes">pseudo-classes</a></h2>
616611

@@ -673,14 +668,6 @@ should be implemented.
673668

674669
<p>Pseudo-elements and pseudo-class names are case-insensitive.</p>
675670

676-
<!--
677-
<p>Several pseudo-element rules may have an impact on the same
678-
content. These are called <span class="index-def" title="overlapping
679-
pseudo-elements">overlapping pseudo-elements</span>. An <a
680-
href="#overlapping-example">example</a> is provided below.
681-
682-
[Isn't this obvious? BB]-->
683-
684671
<P>Some pseudo-classes are mutually exclusive, while others can be
685672
applied simultaneously to the same element. In case of conflicting
686673
rules, the normal <a href="cascade.html#cascading-order">cascading

0 commit comments

Comments
 (0)