
org.lesscss.mojo.js.less.tree.negative.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lesscss-maven-plugin Show documentation
Show all versions of lesscss-maven-plugin Show documentation
Fork of official LESS CSS Maven Plugin
The newest version!
(function (tree) {
tree.Negative = function (node) {
this.value = node;
};
tree.Negative.prototype = {
type: "Negative",
accept: function (visitor) {
this.value = visitor.visit(this.value);
},
genCSS: function (env, output) {
output.add('-');
this.value.genCSS(env, output);
},
toCSS: tree.toCSS,
eval: function (env) {
if (env.isMathOn()) {
return (new(tree.Operation)('*', [new(tree.Dimension)(-1), this.value])).eval(env);
}
return new(tree.Negative)(this.value.eval(env));
}
};
})(require('../tree'));
© 2015 - 2025 Weber Informatics LLC | Privacy Policy