Re: [css3] "Selectors that People Actually Use"

On Mon, 18 Feb 2008 21:11:52 +0100, Alan Gresley <alan1@azzurum.com> wrote:
> body[xmlns="http://other-domain.org/xhtml"] {}
> body[xmlns="http://other-domain-two.org/xhtml"] {}
> body[xmlns|="domain"] {}
>
> and another author somewhere else could overrule my last selector with  
> this one.
>
> :root[xmlns|="domain"] {}

All these selectors would not work in XML as the xmlns attribute is always  
in a namespace. I also don't think they're convincing use cases. :root may  
be useful, not sure, if the root element can also occur in a sub tree, as  
is the case in SVG. In general you probably never need it, but I don't  
believe it's a very costly selector, so it probably doesn't matter that  
much.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 18 February 2008 21:58:37 UTC