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

Re: Opera's Proposal for :context Selector

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 11 Jul 2008 13:21:17 -0700
Message-ID: <4877C0BD.10907@terrainformatica.com>
To: David Håsäther <hasather@gmail.com>
CC: www-style <www-style@w3.org>

David Håsäther wrote:
> * Andrew Fedoniouk @2008-07-11 20:40:
>
>>> Yes, I know :root can only be the first element, which is why I'm 
>>> saying it can't be used in this case!
>>
>> Why? The idea of :root to be a pseudo-class imply that different
>> elements may have this state/role assigned.
>>
>> Otherwise why not to use element html as it is?
>> Write something like this and it will be perfectly fine:
>>
>> html > body > div { ... }
>
> CSS can be used with other markup languages than HTML.
>
Correct.

But in context when you have to use :root in selectors you *always* know
what DOM you are dealing with.

Example, following implies that you are targeting HTML:

   :root > body > something {}

and this:
   :root > text

implies that you work with presumably SVG.

Resume:
  :root is really useful only in context of local searches.

--
Andrew Fedoniouk.

http://terrainformatica.com
Received on Friday, 11 July 2008 20:22:08 GMT

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