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

Re: Color prototypes

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 28 Sep 2001 07:23:23 +0200
To: bert.bos@sophia.inria.fr
Cc: www-style@w3.org
Message-ID: <fh08rtoqn401ti6uq7it348qoio5fqp55a@4ax.com>
* Bert Bos wrote:
>Andrew Thompson writes:
>> > Bjoern Hoehrmann <derhoermi@gmx.net> schrieb/wrote:
>> > >   @color brand rgb(22, 176, 64);
>> > >   h1 { color: color(brand);
>> > >        text-underline: single-accounting color(brand) }
>> > 
>> > Hm, you can already do something like that by using a pre- 
>> > processor.

>On the other hand, I've written some quite complex style sheets, some
>over multiple files, but I have never felt the need for a preprocessor
>(and I consider myself an experienced programmer...). The files are
>always small enough that they don't need anything beyond a text editor
>and for sharing colors and fonts between elements the existing
>grouping syntax is usually adequate. And if not, just putting things
>near each other solves the rest.

Do you have any good reason why authors waive this convenience? Don't
just consider plain text style sheets, consider CSS DOM manipulations.
You would have to hardcode what elements and properties should be
changed if you want to change some color and thus the script would get
large and it won't be easy to port the script to other documents, unless
you give all those elements some ID. Consider SVG documents that want to
animate some colors automatically or on user action, maybe to make some
graphic more accessible for color blind people with just one click. SVG
come with mechanims to reuse shapes, paths, gradients and so on, why
shouldn't CSS have some mechanism to reuse colors?

regards,
-- 
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 Friday, 28 September 2001 01:24:00 GMT

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