W3C home > Mailing lists > Public > www-style@w3.org > April 2007

Re: Select a parrent node with s CSS selector?

From: James Craig <jcraig@apple.com>
Date: Tue, 24 Apr 2007 17:49:10 -0700
Message-Id: <B9E139CD-73A9-494D-838C-610073CB3E3F@apple.com>
To: www-style@w3.org

Daniel Beardsmore wrote:

> I'm curious thus to know precisely *why* a parent node selector is  
> so important? What would it solve that cannot be solved with  
> existing CSS2 or CSS3 selectors?

Interaction design. The first example that comes to mind is, if you  
mouse over a link in a paragraph or other section, you could dim the  
paragraph to make the link stand out instead of changing the link...  
Currently you can only change the properties of the link and its  
descendants.

Currently you could use "p:hover a:link, p:hover a:visited" to expose  
*all* anchors in a paragraph, but this rule would let you single out  
the individual link.

James
Received on Wednesday, 25 April 2007 00:50:40 GMT

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