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 14:36:31 -0700
Message-ID: <4877D25F.1030408@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 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".

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

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.


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

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