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

Re: Class Selectors Extension Proposals

From: Alberto Pacheco <apacheco@platon.itchihuahua.edu.mx>
Date: Thu, 6 Jun 2002 14:03:17 +0200
To: www-style@w3.org
Message-Id: <200206061403.17457.apacheco@platon.itchihuahua.edu.mx>

> I fail to see anything that is impossible with the current models for

class names and rule

> sets.  I would do as follows.
>
> .x {
>     a: i1;
>     b: j1;
>     c: k1;
>     }
> .x4 {
>     a: i4;
>     }
>
> <span class="x x4">This element belongs to two classes, each
> addressed in

the style

> sheet and given appropriate declarations.</span>
>
> We have yet to find a use case that falls outside the ability of the

current models.

You're right.. in current CSS.

THIS IS an use case outside CSS model's abilities:

Tacus (http://www.depi.itch.edu.mx/apacheco/expo) is a presentational
language based on CSS (and is part of ExpoVision system)  where the
 user can define macros like:

"@1()=bic(red,white)"

If we have the macro-call: "@1(blue)" it is expanded to:
 "bic(blue,white)"

So what?

Let be:

    .b { font-weight: bold; }
    .i  { font-style: italic; }
    .c { color: red; background-color: white; }

Then the pre-processing phase produces a CSS _IDEAL_ output:

    <span class="b i c(blue)"> /* _NOT_ currently supported by CSS2
 (this is the use case!!) */

So we have to be relegated to the following unelegant and not so
 eficient coding (current Tacus implementation) like:

    <span class="b i" style="color:blue; background-color:white;">

Note: Is impractical to define all posible user styles for any Tacus
presentation document

The dilemma is: To give the user a set of pre-defined styles (like
 classes "i" and "b") but to give him/her freedom to use his/her
 favorite/personal style attributes values (like he/she did with colors
 of class "c")


Alberto Pacheco
Tacus and ExpoVision designer and implementor
alberto@computer.org
Received on Thursday, 6 June 2002 09:24:08 GMT

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