W3C home > Mailing lists > Public > www-style@w3.org > December 2005

Re: suggestion: common CSS prefix

From: Mikko Rantalainen <mikko.rantalainen@peda.net>
Date: Wed, 14 Dec 2005 17:49:00 +0200
Message-ID: <43A03EEC.2080003@peda.net>
To: www-style@w3.org

Benjamin Piwowarski wrote:
> 
> div#external div { ... }
> div#external img { ... }
> [would be written as]
> @prefix div#external;
> 
> div { ... }
> img { ... }

To be better backwards compliant with existing CSS implementations 
I'd rather use syntax

@context(div#external)
{
   div { ... }
   img { ... }
}

There's still the problem, how do you define the context if selector 
"a b" isn't good enough. Would it be okay to write

@context(div#external > )
{
   div { ... }
   img { ... }
}

That is, the content's of @context would be used as a literal 
string. If so, then perhaps the value should indeed be a literal 
string. Quotation marks would need to be escaped, though.

If you need this kind of features any time soon (less than 5 
years?), I'd suggest using some kind of pre-processor.

-- 
Mikko
Received on Wednesday, 14 December 2005 15:51:44 GMT

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