Files
less.js/lib/less/node/element.js
cloudhead ad66408b9f init
2010-02-23 13:39:05 -05:00

22 lines
538 B
JavaScript

node.Element = function Element(combinator, value) {
this.combinator = combinator;
this.value = value.trim();
};
node.Element.prototype.toCSS = function () {
var css = this.combinator.toCSS() + this.value;
return css;
};
node.Combinator = function Combinator(value) {
this.value = value.trim();
};
node.Combinator.prototype.toCSS = function () {
switch (this.value) {
case '&': return "";
case ':': return ' :';
case '>': return ' > ';
default: return ' ' + this.value;
}
};