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

RE: Class Selectors Extension Proposals

From: Benjamin D. Gray <bdgray@gcomputer.net>
Date: Thu, 16 May 2002 12:41:21 -0400 (EDT)
Message-ID: <65685200AF3BE841842736134739723014A521@POSTOFFICE.uwyo.edu>
To: <www-style@w3.org>
-----Original Message-----
From: Daniel Glazman [mailto:glazman@netscape.com] 
Sent: Thursday, May 16, 2002 5:32 am
To: Alberto Pacheco
Cc: www-style@w3.org
Subject: Re: Class Selectors Extension Proposals

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>


It seems like at least that particular use:
<span class="c(50%,red)">
would be a step back to <font color=red>




Benjamin D. Gray
WIND Web Developer
http://uwyo.edu/wind/
Received on Friday, 17 May 2002 12:21:45 GMT

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