W3C home > Mailing lists > Public > www-style@w3.org > March 2013

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

From: Øyvind Stenhaug <oyvinds@opera.com>
Date: Wed, 20 Mar 2013 16:30:26 +0100
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <op.wt8300blbunlto@oyvinds-desktop>
On Wed, 20 Mar 2013 15:29:31 +0100, Tab Atkins Jr. <jackalmage@gmail.com>  

> 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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:27 UTC