Re: Color prototypes

* isoma wrote:
>> Example:
>>
>>   @color brand rgb(22, 176, 64);
>>
>> The <color> token used in the property definitions, that take some
>> color, should then be extended with a new color() function, e.g.
>>
>>   h1 { color: color(brand);
>>        text-underline: single-accounting color(brand) }
>>
>> If the user agent hasn't seen a @color rule for the specified name, the
>> property must be ignored. If there were multiple @color rules, the
>> color() function refers to the last definition of that color.
>>
>> This would greatly ease writing and maintaining stlye sheets.
>
>Some of this work could be done by a CSS processor.  If this were
>implemented I'd prefer to see a more general approach taken,

I though of a generic pendant to the attr() function, e.g. a

  @proto <name> <type> <value>;

and a new general attribute value like

  proto(<type>, name)

(the type value may be redundant here...)

Example:

  @proto mylength length 15px;
  h1 { margin: proto(length, mylength);
       font-size: proto(length, mylength) }

but I didn't see the great use for it. I am fine with <color>s.

>specifically
>I'd like to say "style this the way you styled that element, having taken
>other stylesheets in the cascade into consideration".

_This_ can be achieved by grouping selectors.
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/

Received on Saturday, 15 September 2001 22:16:02 UTC