If you are only controlling things via which less files to include,
you cannot expect to influence a file which has a variable declaration
and then uses it - The variable declaration overrides anything before
it and afterwards it is too late as it is a directly output mixin, not
a function mixin. e.g.
@a: red;
.func {
color: @a;
}
@a: green;
.func2 {
.func();
}
would output
.func {
color: red;
}
.func2 {
color: green;
}
so you could call the mixin after you have done the override.. but the
way you are doing it, it would need 3 files as well I think.
What I do is have a file called "theme.less" which defines the
defaults for a load of variables. Then I have a theme override file
that overrides variables to set the theme, then I have the main bulk
of less code..
If you think there is something wrong with the way variable scoping
works, please give a clear simplified example and why you think it is
wrong (and make sure you are using the latest version.. I fixed some
scoping issues a couple of months ago).