Is is possible to, in a linked css sheet to define a variable and
assign the color blue, for instance to it? Then you could use this as
the value for say, any property that takes a color.
I know you can do:
h1, h2, h3, h4 {color:blue}
to define the color blue for all those tags but I want to use the same
color for the "color" property, the "background" property, the
"border-color" property, etc. So if you could define a variable for
this color, then you could just insert it instead of the value "blue"
in each of the property's value parameters. Then when you wanted to
change the color you could just change it where you defined the
variable.
I've looked alot but can't find anything on this but would think this
would be possible?!?
Thanks in advance,
Kent
Jukka K. Korpela - 29 Jun 2003 07:32 GMT
> Is is possible to, in a linked css sheet to define a variable and
> assign the color blue, for instance to it?
No. And there probably won't be, as judged from the discussions on the
www-style list. The general trend among the people who work on CSS
specifications is that authors are supposed to use authoring tools like
preprocessors for such things.

Signature
Yucca, http://www.cs.tut.fi/~jkorpela/
Bertilo Wennergren - 29 Jun 2003 11:02 GMT
Jukka K. Korpela:
>> Is is possible to, in a linked css sheet to define a variable and
>> assign the color blue, for instance to it?
> No. And there probably won't be, as judged from the discussions on the
> www-style list. The general trend among the people who work on CSS
> specifications is that authors are supposed to use authoring tools like
> preprocessors for such things.
One convenient way is to use PHP (or some similar server side system) for
stylesheets (making sure the PHP code sets the correct media type, of
course).

Signature
Bertil Wennergren <bertilow@gmx.net> <http://www.bertilow.com>