mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
stateless URL evaluation
This commit is contained in:
@@ -6,14 +6,14 @@ tree.URL = function (val, paths) {
|
||||
val.value = [paths[0], val.value].join('/').replace('//', '/');
|
||||
}
|
||||
this.value = val;
|
||||
this.paths = paths;
|
||||
};
|
||||
tree.URL.prototype = {
|
||||
toCSS: function () {
|
||||
return "url(" + this.value.toCSS() + ")";
|
||||
},
|
||||
eval: function (ctx) {
|
||||
this.value = this.value.eval(ctx);
|
||||
return this;
|
||||
return new(tree.URL)(this.value.eval(ctx), this.paths);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user