W3C home > Mailing lists > Public > www-style@w3.org > May 2002

Re: Class Selectors Extension Proposals

From: Daniel Glazman <glazman@netscape.com>
Date: Thu, 16 May 2002 13:32:11 +0200
Message-ID: <3CE398BB.30901@netscape.com>
To: Alberto Pacheco <alberto@computer.org>
CC: www-style@w3.org
Alberto Pacheco wrote:

> Does CSS support the following class descriptors functionality?
> 1) Adding classes
>     Let be
>         .a { p1; }
>         .b { p2; }
>     How do I get ".c {.a + .b}"  or "<span class=a+b>"
>     Where class c combines a & b classes properties, ie equivalent to 
> ".c { p1; p2; }"

Just write <span class="a b">.

>  2) Parametrized classes
>     How do I get something like:
>         .c(X,Y) { width:X; color:Y; }
>     To be refered in HTML later as:
>         <span class="c(50%,red)">
>     Where class c becomes equivalent to ".c { width:50%; color:red;)"
> I know it sounds crazy..

Oh ! That one is interesting and not so crazy. We already have 
pseudo-classes accepting parameters, so why not classes (theoretical 
question only)...
Unfortunately it's not only on the CSS side and would imply a 
modification of the class attribute's model.
Anyway, I think it deserves to be added to the CSS Suggestions List, if 
it is still active. Bert, what do you think ?


Daniel Glazman  - Netscape Communications Corp. -  glazman@netscape.com
http://people.netscape.com/glazman            AIM:glazou2000 IRC:glazou
http://cascades.mozdev.org          CaScadeS, just a question of styles
Received on Thursday, 16 May 2002 07:28:59 GMT

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