Re: Class Selectors Extension Proposals

"Alberto Pacheco" wrote:
>
> 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;">

<span class="b i c" style="color: blue">

The 'style' attribute has a higher specificity than the selector
".c", so the inline color rule overrides the one attached to class
'c'.

~fantasai

Received on Thursday, 6 June 2002 21:25:50 UTC