W3C home > Mailing lists > Public > www-style@w3.org > September 2006

Re: [css3-selectors] :parent selector

From: Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
Date: Mon, 25 Sep 2006 13:42:47 +0400
Message-ID: <4517A497.2040408@SoftwareManiacs.Org>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org


fantasai wrote:
>   /* select links with img child, i.e. all image links */ {

This made me think that :parent selector would be both useful and fast 
if it would be limited to the situation when parent has only *one* 
child. I.e.:

     :link:parent img {
       border: none;

...would match only in cases like `<a><img/></a>` (may be with 
whitespace). This eliminates worries about multi-megabyte children 
collections. And even if this only child is multi-megabyte its opening 
tag is available immediately.
Received on Monday, 25 September 2006 09:43:10 UTC

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