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

Re: Class Selectors Extension Proposals

From: Etan Wexler <ewexler@stickdog.com>
Date: Sat, 18 May 2002 06:01:09 -0700
To: glazman@netscape.com (Daniel Glazman), www-style@w3.org
Message-ID: <3CE5EE25.28318.3A01338@localhost>
Daniel Glazman wrote:

> Alberto Pacheco wrote:
>     Does CSS support the following class descriptors functionality?
>  [...]
>      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.

The modification of the 'class' attribute's model is one good reason to avoid 
parametrized classes.

The separation of structure and style is another good reason to avoid parametrized 

> Bert, what do you think ?

Bert noted, "In general, it is better to keep stylistic info out of the document, but when it 
is needed, it is better to put it in one, dedicated attribute, and not mix it with
other mark-up." (<mid:15587.56593.874090.69287@jfouffa.inria.fr> / 
<http://lists.w3.org/Archives/Public/www-style/2002May/0090.html>)  I thoroughly agree.  
Parametrized classes seem like a solid backward step into the land of HTML 3.2.

Etan Wexler <mailto:ewexler@stickdog.com>
Received on Saturday, 18 May 2002 09:17:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:01 UTC