Proposal for inclusion of variable constant definition in CSS3 syntax

Hi,

I'm not sure it is my place to propose stuff like this, but I'm sure 
that nothing will happen unless I open my big mouth.

I've been using CSS pretty much since it first was implemented in 
browsers, and I've come to identify what I feel is a major flaw in CSS: 
The lack of constant definitions.

When creating style sheets it is rather common to use the same rules in 
multiple selectors, especially with colors and fonts. Selectors and 
inheritance allows for a certain degree of flexibility, but at some 
point one usually ends up with specifying the same rules in many 
different places in the style sheet.

This is not so much an issue until you need to change something, like a 
colour, which is defined in 7 places in your style sheet. When making 
multiple changes the problem is emphasized.

I propose CSS3 would allow constant definitions. This way authors could 
define a constant, which could then be used in multiple places in the 
style sheet. This approach would simplify authoring a great deal, 
especially in applications where the same style sheet is themed for 
different customers, for example.

I realize this approach would break backwards compatibility, as well as 
add to style sheet processor complexity. I'd like to hear if anyone else 
feels the benefits outweigh the drawbacks of this approach.

Max Romantschuk

Received on Wednesday, 28 April 2004 06:12:13 UTC