mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
29 lines
641 B
JavaScript
29 lines
641 B
JavaScript
var Node = require("./node");
|
|
|
|
var Alpha = function (val) {
|
|
this.value = val;
|
|
};
|
|
Alpha.prototype = new Node();
|
|
Alpha.prototype.type = "Alpha";
|
|
|
|
Alpha.prototype.accept = function (visitor) {
|
|
this.value = visitor.visit(this.value);
|
|
};
|
|
Alpha.prototype.eval = function (context) {
|
|
if (this.value.eval) { return new Alpha(this.value.eval(context)); }
|
|
return this;
|
|
};
|
|
Alpha.prototype.genCSS = function (context, output) {
|
|
output.add("alpha(opacity=");
|
|
|
|
if (this.value.genCSS) {
|
|
this.value.genCSS(context, output);
|
|
} else {
|
|
output.add(this.value);
|
|
}
|
|
|
|
output.add(")");
|
|
};
|
|
|
|
module.exports = Alpha;
|