Re: Selector "on presence of"

> BODY.letter:conditional(BODY IMG.logo) { margin-top: 2em; }
> 
> applies to BODY elements with class "letter" when there is an element IMG
> with class "logo" in the document tree.

If you take a look at actual CSS 2 selectors, you'll see that they are
designed so the browser does not have to deal with the complete parse
treee of the document. Implementors have already refused extensions of
selectors because of this lack of a full parse tree and for
'performances' reasons.

I clearly see the interest of such a proposal if a document is signed
at the bottom of the document, i.e. if it contains something with a
class or id saying the document is signed. In that case, you often
want to inform the reader at the top of the document and then you know
such a mechanism.

My opinion :

1) lack of a parse tree : this is implementation problem and should
not constrain the spec...
2) performances : even my Pilot is able to browse the web and the very
first Sega or Nintendo is more powerful than my pc !

So : your proposal is interesting but you can be 100% sure that
implementors will refuse it for implementation reasons.

Last thing : pseudo-elements do not imply a condition on the target
element in CSS2. Your proposal breaks that.

</Daniel>
--
PS: I'm sick and away from my office from 980605 to 980610

Received on Friday, 5 June 1998 03:44:51 UTC