I am attempting to use lesscss to build a templating system where each template has 3 or 4 alternative colour schemes.
So for example, I could have a red.less
stylesheet that looks like this:
@main_colour: #ff0000;
@import 'main.less';
So, I only have one main.less
stylesheet to maintain which contains all the main styles, and uses the variables set for colour codes. I can then create a seperate colour.less
file for each colour scheme.
Only problem is when I try to do this I get a Less::VariableNameError
which indicates that LESS is parsing the @imports BEFORE it parses the variables.
Is there a workaround to this or any other way to achieve the same end result?