Re: Color prototypes

Bert Bos wrote:

> 
> 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.
> 
> And also I fear the politics of it: if we design a new macro language,
> everybody will laugh at us for reinventing the wheel. If we pick an
> existing once, the m4 fanatics will hate us for choosing cpp and vice
> versa; if we take JSP, the ASP programmers will be unhappy, and so
> will those of PHP, SSI, Perl, etc. etc...
> 


Thanks for the considered reply. It looks like we're both in agreement
that a preprocessor is not a solution to these class of problems until
and unless a happy accident occurs and the indusrty settles on a
solution. I don't think this is very likely.

My point is then, that "we think that feature is useful but its not
being considered because one can do it with a pre-processor" is not a
sufficient reason not to add something to the spec.

Since I've been on the www-style list (a year plus) the idea of colour
names has been raised 2 or 3 times. People more eloquent than me have
made a very good case for it, including such enhancements as being able
to define a base colour and differences from it - in other words themes.
There's never been a convinving counterargument I can remember, other
than the pre-processor one.

Its been expressed that one thing that's very hard to do in CSS as it
stands is use logical symbolic names for things such as highlighting and
shadows. 

Though I can't put it as well as it has been put, the basic idea is you
define your base colour for the theme (say 'blue' or #XXXXXX) and then
specify all other colours relative to that (so eg, one would need
'lighter', 'darker' '20% lighter' and perhaps a good deal more).

Now changing this scheme of a website becomes a simple matter of
changing the base colour in the majority of cases, and all of the
dependent colours change accordingly. Combined with inheritance and the
cascade this would be very powerful indeed. This isn't so much colour
names as "relative colour" support. Given most everything in CSS can be
expressed in relative terms, the lack of relative colours is surprising,
and very limiting in terms of what one can do with colour and the
cascade. 

So here's the thing, myself and others believe this would e a very
useful addition, but its unclear how to ever resolve this issue. Is
there a module which is going to address this sort of thing? Is it out
of scope for all time? Presumably the working group has mechanisms for
gauging industry opinion on matters such as these. It might be time to
apply those methods.



AndyT (lordpixel)

Received on Thursday, 27 September 2001 20:03:35 UTC