Home › Forums › CSS › Managing different coloured pages (with different coloured elements) in LESS › Re: Managing different coloured pages (with different coloured elements) in LESS
July 16, 2013 at 12:00 pm
#143128
TheDoc
Member
By setting the color on the `body` you should be able to avoid some of that. Most elements (p, ul, ol, dl, dt, blockquote, etc) all look to *inherit* colors.
body {
color: /* insert default */;
&.green {
color: $textColorGreen;
}
&.purple {
color: $textColorPurple;
}
}
Sorry for my use of Scss, it’s just quicker for me.
Having said all that, using words like ‘green’ and ‘purple’ just lead to trouble down the road when you want to change the purple to pink and then need to change all of the variables. Just something to think about.