SASS class based themes

bestautions

New Member
I'm trying to come up with a way of creating a class based theme using SASS but as i'm new to it I don't know enough to make it work or know whether my attempt is even worth it.I want a theme to be based on a class which is set on either the HTML or Body tag. Then all colors and backgrounds etc are derived from that.What I want SASS to do is handle all the leg work. Please excuse the crude example as I say I'm new to this:\[code\]$baseBackground: #0f0;.blue { $baseBackground: #0f0;}.red { $baseBackground: #0f0;}.header { background: $baseBackground;}\[/code\]If the code block above is SASS I want the CSS to end up like:\[code\].header { background: #0f0;}.blue .header { background: #00f;}.red .header{ background: #f00;}\[/code\]I've no idea whether this is possible or not. Obviously the example above doesn't work. Is there a way to handle this without having to generate the additional styles?Many thanks for your time.Chris
 
Back
Top