I would like to use a base stylesheet with the colours defined as dotless variables. Then, depending on the color theme that I use I would like to change this colors.
- example of base stylesheet:
body
{
color: @brand_color;
}
- Example of specific stylesheet, depending in the color scheme I pick:
@import "../BaseStyleSheet.less.css";
@brand_color: green;
How can I achieve this?
The extension of the imported file should be ".less".
Changing the variable value after or before the import statement makes no difference, it just doesn't change the variable value, making what I wanted not possible.
"Imports will not have access to variables in the main reference Less file (or other referenced Less files in the main one). This ensures that imported Less files have no dependencies on where they are been used."
http://enginechris.wordpress.com/2009/11/23/my-thoughts-on-using-dotless-and-the-less-syntax/