Re: CSS feature request

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.
>
Use archives for last month or so. Discussed a lot already.

There are two proposals (in order of appearance) so far:

CSS @const per se: http://csswg.inkedblade.net/ideas/constants
And CSS @variables http://disruptive-innovations.com/zoo/cssvariables/

There is also a third one which I would classify as a @mixin
http://lists.w3.org/Archives/Public/www-style/2008Feb/0102.html

--
Andrew Fedoniouk.

http://terrainformatica.com

Received on Thursday, 26 June 2008 22:03:57 UTC