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

Re: parent selectors

From: Dylan Schiemann <dylans@yahoo.com>
Date: Wed, 29 Nov 2000 12:09:21 -0800 (PST)
Message-ID: <20001129200921.9997.qmail@web124.yahoomail.com>
To: www-style@w3.org
> > span * < p < div {}
> Question : what means then span * < p < div + foo ?
> Does it select foo ?

Under this definition, it would select foo.

> Other question : how do you select the predecessor
> of an element ?

As it exists now, E ~ F selects an F element which is
preceded by a E element.  If the use of < implied that
all rules were in reverse order, then E ~ F would mean
select an F element which precedes an element E.  This
seems to prevent being able to select E.

If a valid selector syntax allowed both > and < ,
there would propbably need to be a new symbol for a
reverse-order predecessor.  Maybe there could be a
symbol to precede any existing symbol or selector to
imply reverse order?  i.e., using ^ as this symbol

span * < p < div ^~ foo

would select the element foo which precededes the div.

span * < p < div ~ foo

would select the div element which is preceded by foo.


span * < p < div + foo
 would select div


span * < p < div ^+ foo

would select foo.


span * < p < div > foo

would select div which has foo and p > * span as
descendants, though this limits choosing two
descendants in this manner.

I see a few different possibilities mixing around the
examples above, but don't know if any of them are any
better than the draft.  I do think that using :subject
feels more like a special case or an afterthought than
a consistent part of the spec.

-Dylan Schiemann

Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
Received on Wednesday, 29 November 2000 15:09:26 UTC

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