Re: Opera's Proposal for :context Selector

David Håsäther wrote:
> * Andrew Fedoniouk @2008-07-11 22:21:
>
>>> 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.
>
> No, that would make :root pretty useless. It's primary use case is 
> rather the opposite.
>
>> Example, following implies that you are targeting HTML:
>>
>>    :root > body > something {}
>
> Certainly not. Any markup language may define an element type with the 
> name "body".
>
Correct.

But if you will define  markup language that can share style sheets that 
contain something like this:
:root > body > ul > li {....}
then you can undoubtedly give name "HTML" to that language. Otherwise 
purpose of such language
is unknown to me. Any practical ideas/examples?

I mean that particular CSS design is always targeted to particular 
markup language/namespace/vocabulary.
Otherwise I would like to see real examples of CSS files that use :root 
and can be shared between say
HTML and SVG.

As I said :root makes real sense for scoped lookups. For plain CSS scope 
is the root element. Perfectly fine.
For scoped style sheets that is the element that establishes the scope.

-- 
Andrew Fedoniouk.

http://terrainformatica.com

 

Received on Friday, 11 July 2008 21:37:20 UTC