lessphp icon indicating copy to clipboard operation
lessphp copied to clipboard

variable override

Open Evanion opened this issue 11 years ago • 1 comments
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.

Evanion avatar Jun 08 '14 22:06 Evanion

This could be closed. It was fixed with the PR #548, available in the v0.5.0 release.

tzi avatar Apr 10 '15 09:04 tzi