W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: Parent Combinator / Parent pseudo-class

From: Alan Gresley <alan@css-class.com>
Date: Wed, 23 Jul 2008 21:31:02 +1000
Message-ID: <48871676.2050108@css-class.com>
To: w3mail@jixor.com
CC: www-style@w3.org

Stephen wrote:
> Ingo Chao wrote:
>> 2008/7/19 Stephen <w3mail@jixor.com>:
>>> ...
>>> My concept is that it should be possible to target an element with 
>>> specific
>>> children...
>> div:with-child(h5) {
>>   float: left;
>>   overflow: hidden;
>> }
>> I think that would cause a reflow of what is already rendered of the
>> div when a h5 is encountered.
>> regards
> I have considered this and to me it would be a matter of choice, a 
> developer would be aware that it could cause awkward adjustments however 
> for the rendering engine one would expect it would be no different to 
> doing it with javascript, which is a quite simple process, but not 
> really satisfactory as I tend to prefer to avoid js as much as possible 
> for obvious reasons.

A parent combinator pseudo-class or parent pseudo-class requires a CSS 
parser to walk the chain. This is a huge performance hit which requires 
scripting. What would you require a parent combinator pseudo-class for?

Alan http://css-class.com/

Nearly all men can stand adversity, but if you want to test a man's 
character, give him power - Abraham Lincoln
Received on Wednesday, 23 July 2008 11:31:51 UTC

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