mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
Pass env with toCSS in function call evaluation; Add tests; Fixes #957
This commit is contained in:
@@ -36,7 +36,7 @@ tree.Call.prototype = {
|
||||
}
|
||||
} else { // 2.
|
||||
return new(tree.Anonymous)(this.name +
|
||||
"(" + args.map(function (a) { return a.toCSS() }).join(', ') + ")");
|
||||
"(" + args.map(function (a) { return a.toCSS(env) }).join(', ') + ")");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
height: undefined("self");
|
||||
border-width: 5;
|
||||
variable: 11;
|
||||
background: linear-gradient(#000000, #ffffff);
|
||||
}
|
||||
#built-in {
|
||||
escaped: -Some::weird(#thing, y);
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#functions {
|
||||
@var: 10;
|
||||
@colors: #000, #fff;
|
||||
color: _color("evil red"); // #660000
|
||||
width: increment(15);
|
||||
height: undefined("self");
|
||||
border-width: add(2, 3);
|
||||
variable: increment(@var);
|
||||
background: linear-gradient(@colors);
|
||||
}
|
||||
|
||||
#built-in {
|
||||
|
||||
Reference in New Issue
Block a user