It’s not possible with CSS alone.
You can do it with JavaScript and LESS using less.js, which will render LESS variables into CSS live, but it’s for development only and adds too much overhead for real-life use.
The closest you can come with CSS is to use an attribute substring selector like this:
[id*="colvar-"] {
color: #f0c69b;
}
and set the id
s of all your elements that you want to be adjusted to names starting with colvar-
, such as colvar-header
. Then when you change the color, all the ID styles are updated. That’s as close as you can get with CSS alone.