diff --git a/lib/less/tree/call.js b/lib/less/tree/call.js index 0935d547..02948040 100644 --- a/lib/less/tree/call.js +++ b/lib/less/tree/call.js @@ -23,7 +23,7 @@ tree.Call.prototype = { // The function should receive the value, not the variable. // toCSS: function (context, env) { - var args = this.args.map(function (a) { return a.eval() }); + var args = this.args.map(function (a) { return a.eval(context) }); if (this.name in tree.functions) { // 1. return tree.functions[this.name].apply(tree.functions, args).toCSS(); diff --git a/test/css/functions.css b/test/css/functions.css index fe35418b..de930eed 100644 --- a/test/css/functions.css +++ b/test/css/functions.css @@ -3,6 +3,7 @@ width: 16; height: undefined("self"); border-width: 5; + variable: 11; } #built-in { escaped: -Some::weird(#thing, y); diff --git a/test/less/functions.less b/test/less/functions.less index 2c4fceb0..f1224e8e 100644 --- a/test/less/functions.less +++ b/test/less/functions.less @@ -1,8 +1,10 @@ #functions { + @var: 10; color: color("evil red"); // #660000 width: increment(15); height: undefined("self"); border-width: add(2, 3); + variable: increment(@var); } #built-in {