W3C home > Mailing lists > Public > www-style@w3.org > December 1997

Re: Backwards compatibility of new selectors

From: David Perrell <davidp@earthlink.net>
Date: Thu, 4 Dec 1997 16:30:15 -0800
To: <neil@bigpic.com>
Cc: "Style" <www-style@w3.org>
Message-ID: <01bd0114$f4a268e0$7b75d9cf@davidp>

Neil St.Laurent wrote:


<<
That is right, the syntax lets you do a lot of silly things.  What
you may be thinking that /DIV P/ does is what the following would do:

/DIV //P//

However, that is equivalent to:

DIV ~ //P/
>>

No, I had figured it was _not_ intended to match multiple sibling elements.
Here's the way I had decided it must have been intended to work:

----
A sequential selector matches when an element is the first such element to
follow an arbitrary sibling.

Sequential selectors have the following syntax: a forward slash ("/")
precedes the first selector and immediately follows the second selector. The
sequential selector matches if (1) the element matched by the second
selector is the first such element to follow any element matched by the
first selector and (2) both elements have the same parent.

If there is a tilde (~) between the selectors, then the sequential selector
matches if the element matched by the second selector immediately follows
any element matched by the first selector, i.e., without any intervening
elements.
----

David Perrell
Received on Thursday, 4 December 1997 19:30:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:53 GMT