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

Re: parent selectors

From: Daniel Glazman <glazman@netscape.com>
Date: Wed, 29 Nov 2000 09:02:28 -0800
Message-ID: <3A2536A4.1010803@netscape.com>
To: Dylan Schiemann <dylans@yahoo.com>
CC: www-style@w3.org
Dylan Schiemann wrote:

> Has there been any thought given to adding parent
> selectors?  What I mean by the term parent selector
> would be to style a parent based on it matching a
> pattern for its child elements.

In the current Working Draft, this is achieved using the :subject
pseudo (I know, it's a bad syntax, but the idea is here).
See [1].

To select the DIV that contains P#foo, write DIV:subject > P#foo

[1] http://www.w3.org/TR/css3-selectors/#subject-pseudo

</Daniel>
Received on Wednesday, 29 November 2000 12:02:07 GMT

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