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

parent selectors

From: Dylan Schiemann <dylans@yahoo.com>
Date: Tue, 28 Nov 2000 20:18:17 -0800 (PST)
Message-ID: <20001129041817.7651.qmail@web111.yahoomail.com>
To: www-style@w3.org
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.

I've noticed the :contains("foo") pseudo-class, but
not an equivalent for elements such as span < div
{width:100%;} where the div would receive a width of
100% only if it contained a span as opposed to the
existing div > span {font-weight:900;} which applies a
style to the span.

Is this something that would have too much rendering
overhead to consider?  I see it being useful for
defining alternative styles for elements in a document
based on their content.  For example, a table
containing three or more tr elements could have one
style, while a table with less than that would have

-Dylan Schiemann

Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
Received on Tuesday, 28 November 2000 23:18:19 UTC

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