Re: Opera's Proposal for :context Selector

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 UTC