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

Re: [css3-selectors] "recursive" selectors

From: Andy <aholmes84@shaw.ca>
Date: Tue, 29 Apr 2003 10:39:58 -0700
To: Boris Zbarsky <bzbarsky@MIT.EDU>, www-style@w3.org
Message-id: <3EAEB8EE.8050007@shaw.ca>

Boris Zbarsky wrote:

> Andy wrote:
>
>> Ok point taken, maybe selecting based on all CSS properties isn't 
>> perfect idea. But surely you can't disagree that selecting based on 
>> display type or the like is a bad?
>
>
> Why is display special?  Note that if such a selector is introduced it 
> could only be used for _one_ property; otherwise the problems I 
> mentioned arise.  Even then, what happens with:
>
> *:display(block) { display: inline } ?
>
> Or for that matter with:
>
> *:display(inline) { float: right } ? 


Ok, I can see the point you're trying to make but is this any different 
than the :hover pseudo-class in that you just have to be careful in 
which order you place it? In my view, your first example would make all 
block elements inline (not all elements since we have table cells, rows 
etc) and if the second rule followed it, would float all inline objects 
to the right. Seems pretty simple to me.

>
>
> One of the basic principles of CSS at the moment is that determining 
> which rules apply to an element and computing the style of an element 
> are separate processes; the former does not depend on the latter in 
> any way.  This allows some rather significan optimization on the UA 
> end (for example, you don't have to recompute all style for every rule 
> that applies to the element; you can just take all rules that apply 
> and compute the style once, bailing out of looking at 
> lower-precendence rules if the style is fully specified by the 
> higher-precedence ones).
>
> Changing this property of CSS would probably require pretty complete 
> rewrites of all existing CSS engines (nothing wrong with that per se, 
> but that means that it should be considered very carefully).
>
>
Received on Tuesday, 29 April 2003 13:43:48 GMT

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