W3C home > Mailing lists > Public > www-style@w3.org > September 2001

Re: Color prototypes

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 16 Sep 2001 04:15:23 +0200
To: isoma <isoma@compsoc.man.ac.uk>
Cc: www-style@w3.org
Message-ID: <pb28qtc8v3n0538f7fs2obfafmt4a57vac@4ax.com>
* 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 GMT

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