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

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

From: Alan Gresley <alan1@azzurum.com>
Date: Mon, 18 Feb 2008 13:11:52 -0700
To: Geoffrey Sneddon <foolistbar@googlemail.com>
cc: www-style@w3.org
Message-ID: <20080218131151.34b83c2f3c9bef00757a2c62c0fb7450.4d9235aadc.wbe@email.secureserver.net>

Geoffrey Sneddon wrote:

> On 18 Feb 2008, at 17:44, Alan Gresley wrote:
> 
> > * E:root - Very un-useful in HTML. You already know what the root  
> > node is - it's named 'html'.
> >
> > Does every document have HTML as the root element? Look at the  
> > source of this page.
> >
> > http://annevankesteren.nl/test/css/at-rule/import-001.htm
> 
> Yes, it has a HTML root element. It's implied by the context. See HTML  
> 4.01 and/or HTML 5. Sure, it may not explicitly be in the document,  
> but look in any DOM tree of that document, and you'll see it there.
> 
> 
> --
> Geoffrey Sneddon
> <http://gsnedders.com/>


Yes someone offlist has pointed that out my error here with Anne's test case but indeed I see a use case. Across a large site, multi domain or intranet you can have several namespaces.

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<html xmlns="http://other-domain.org/xhtml" xml:lang="en" lang="en">

<html xmlns="http://other-domain-two.org/xhtml" xml:lang="en" lang="en">

Then I could go.

body {}
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"] {}


Alan

http://css-class.com/
Received on Monday, 18 February 2008 20:12:17 GMT

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