W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Re: CSS feature request

From: Joshua Cranmer <Pidgeot18@verizon.net>
Date: Thu, 26 Jun 2008 17:14:50 -0400
To: Roedy Green <roedyg@mindprod.com>
Cc: www-style@w3.org
Message-id: <486406CA.3090707@verizon.net>

Roedy Green wrote:
> The big thing CSS is missing is named constants. You will find 
> yourself mentioning the same colour or group of fonts, or font size 
> over and over. You must make bulk search/replace changes. The problem 
> is when two things temporarily, incidentally have the same colour, you 
> canít change just some of them without manually examining each 
> instance carefully. The problem is analogous to using literals in Java 
> programs instead of named constants.
> If you could simply assign a name to a colour, font family group, font 
> size etc, then you could make a change in only one place and have it 
> ripple though the entire style sheet.
> Until CSS develops this ability, or something equivalent, you might 
> fudge it with a primitive macro preprocessor for CSS. However, such a 
> scheme would have all the drawbacks any language preprocessor has. You 
> would not be able to validate or edit the text with TopStyle, for example.
See the various CSS variables proposals, including this recent thread:

Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Received on Friday, 27 June 2008 04:22:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:37 UTC