Re: [CSS21][css3-selectors] :root in HTML always the HTML element?

On Wed, 20 Mar 2013 15:29:31 +0100, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> I can't completely tell what you're asking for.  Do you want the
> definition of :root revised to avoid implying that the root is
> *always* <html> in HTML, or something else?

I'm not sure what the correct fix would be. Removing the "*always* <html>  
in HTML" part sounds like a possibility.

However, it looks like the current implementation do something different.  
At least, querySelector(':root') returns null for document fragments and  
detached elements in Gecko, Presto and WebKit (I haven't checked Trident).  
This is also checked for in the current Selectors API testsuite.

So if it is desirable to keep this as is, maybe CSS 2.1's "document tree"  
definition should be revised instead. In either case it might be a good  
idea to call out these special cases explicitly in one or both specs.

-- 
Øyvind Stenhaug
Opera Software ASA

Received on Wednesday, 20 March 2013 15:30:57 UTC