W3C home > Mailing lists > Public > www-style@w3.org > February 2000

Re: Selectors erratum (was Re: Various comments on selectors' Test)

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Mon, 7 Feb 2000 15:46:37 +0000 (GMT)
To: Matthew Brealey <thelawnet@yahoo.com>
cc: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.10002071526080.1622-100000@mary.bath.ac.uk>
On Mon, 7 Feb 2000, Matthew Brealey wrote:
>> --- "Eric A. Meyer" <emeyer@sr71.lit.cwru.edu> wrote:
>> BODY P is a selector, with BODY a simple selector, P a simple
>> selector, and ' ' a combinator (defined thus in the grammar:
>> : '+' S* | '>' S* | /* empty */)
> I think the use of descendant selector in the spec must be
> considered erroneous - if they are selectors, they are exactly the
> same as CSS-1 contextual selectors, and therefore the change is
> pointless, so therefore they must be combinators.

CSS1's contextual selectors is a generic name for selectors which use
what in CSS2 became combinators.

   "A B" is, as Eric said, a _selector_. It is a _descendant selector_
   since B must be a descendant of A.

   " " is not a selector, it is a combinator. It is the _descendant
   combinator_. (Although that term is never directly used in the CSS

   "A" is a simple selector, as is "B".

   The string of two simple selectors together with a descendant
   combinator between them is known as a descendant selector.

You never find combinators on their own in stylesheets. You always
find them in selectors. This is probably why the specification never
mentions the " " combinator explicitly as the descendant combinator.

In CSS2, see section 5.2, the paragraph after the "Il disait:  Il
faut mettre l'action en < fast forward >. " quote in section 12.4.2,
and section D.1, the line with only the word "combinator" and the line
which follows it.

In CSS1, see the "contextual selector", "selector", and "simple
selector" entries in the Terminology section, and section 1.6 (in
particular the sentence reading "Contextual selectors in CSS1 look for
ancestor relationships, but other relationships (e.g. parent-child)
may be introduced in later revisions.").

See also most of the CSS3 selectors work-in-progress draft.

Ian Hickson                            ("`-''-/").___..--''"`-._   
http://www.bath.ac.uk/%7Epy8ieh/        `6_ 6  )   `-.  (     ).`-.__.`)
                                        (_Y_.)'  ._   )  `._ `. ``-..-' fL
Member, Mozilla Quality Assurance     _..`--'_..-_/  /--'_.' ,'
Browser Standards Compliance Team    (il).-''  (li).'  ((!.-'    
Received on Monday, 7 February 2000 10:46:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:53 UTC