lessphp
lessphp copied to clipboard
variable override
trafficstars
It seems that the current implementation doesn't support variable override across files. If a variable is set, it's not possible to change it in a parent file.
Works:
@var1: 40px;
.class1 {
height: @var1; }
@var1: 60px;
Doesn't work: (file1.less):
@var1: 40px;
.class1 {
height: @var1; }
(file2.less):
@import "file1.less";
@var1: 60px;
I have been working with the Warp 7 framework for the past year, and having this possibility, makes it possible to define a default value, and then override it. Some frameworks (like uikit) rely on this feature.
This could be closed.
It was fixed with the PR #548, available in the v0.5.0 release.