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

Re: CSS Aliases

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 07 Oct 2008 17:23:40 -0700
Message-ID: <48EBFD8C.6060903@inkedblade.net>
To: Matt Patenaude <MattPat@mattpat.net>
CC: Keiji Ikari <kei@teamikaria.com>, www-style@w3.org

Matt Patenaude wrote:
> 
> Hey Keiji,
> 
> On Oct 6, 2008, at 11:56 PM, Keiji Ikari wrote:
> 
>> Instead, I'd suggest something like this:
>>
>> div.(product, service):first-child > h3 + p
>>
>> So each string (not necessarily a class name) separated by commas in
>> the parentheses would be "expanded out" like mathematical brackets and
>> would be changed by the parser to
>>
>> div.product:first-child > h3 + p, div.service:first-child > h3 + p
>>
>> before being applied.
> 
> I actually thought of something like this as well, and I would probably 
> use this syntax over the one I proposed for new designs. However, I 
> think this only has half of the capability of the alias syntax I 
> proposed, and still presents a lot of search-and-replace work for 
> modifying existing code.
> 
> Ideally I'd like to see a little of both. :)

Something like
   div:matches(.product, .service):first-child > h3 + p
has been proposed before. It is purely syntactic sugar, so should be
very straightforward to implement, and I would support putting it into
Selectors 4.

The sort of "Aliases" you suggest, not so simple. If the above solves
your use case, I'd much rather we concentrate on that. :)

~fantasai
Received on Wednesday, 8 October 2008 00:24:27 GMT

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