Pass env with toCSS in function call evaluation; Add tests; Fixes #957

This commit is contained in:
Dustin Cass
2012-09-21 17:00:23 -07:00
committed by Luke Page
parent 819d6b0ce6
commit 8019439eb4
3 changed files with 4 additions and 1 deletions

View File

@@ -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(', ') + ")");
}
},

View File

@@ -4,6 +4,7 @@
height: undefined("self");
border-width: 5;
variable: 11;
background: linear-gradient(#000000, #ffffff);
}
#built-in {
escaped: -Some::weird(#thing, y);

View File

@@ -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 {