I have a tonne of CSS, and I need the colours of certain elements to change on certain themes that are assigned to a body class.
The most obvious way to approach it would be to gather every class and assign it a colour, eg:
body.blue .btn,
body.blue .icon,
body.blue .whatever {
background: blue;
}
body.green .btn,
body.green .icon,
body.green .whatever {
background: green;
}
But I'm wondering if there's a better way to handle it. Even if I use a preprocessor, I'm pretty sure I still need to assign the colour values this way. Other solutions I've read about include using PHP as the stylesheet (CSS tricks) or dynamically switching out stylesheets as needed (though I'd rather not).
Is there a better way to approach all of this, a way where we can use a variable and not have to create massive class lists?
Thanks