Re: CSS color palettes

While proposals for variables in CSS get rejected on a regular and  
frequent basis, this one made me wonder if there was a backward  
compatible way after all: overloading keywords.

Imagine you could assign your own values to the X11^WSVG color names,  
which a compliant UA would then use on every instance inside this  
cascade of stylesheets, but every other one would safely ignore that  
assignment and use the W3C or UA default as applicable. Therefore  
authors would have to choose an existing color that matches the  
desired one as closely as possible.
This would not have to be restricted to color names, but could be  
extended to many other keywords as well, like |xx-small| through |xx- 
large| for |font-size| or |thin| through |thick| for |border-width|.  
For keywords may appear in different properties with differing  
meaning the scope would have to be defined. I am not sure what  
computed values would be like and I neither propose a specific syntax.
No custom names would be possible and thus not all properties where  
you might like to use variables would support them.

Received on Tuesday, 31 October 2006 21:39:49 UTC