mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
18 lines
458 B
JavaScript
18 lines
458 B
JavaScript
if (typeof(window) === 'undefined') { var tree = require(require('path').join(__dirname, '..', '..', 'less', 'tree')); }
|
|
|
|
tree.Directive = function Directive(name, value) {
|
|
this.name = name;
|
|
if (Array.isArray(value)) {
|
|
this.rules = value;
|
|
} else {
|
|
this.value = value;
|
|
}
|
|
};
|
|
tree.Directive.prototype.toCSS = function () {
|
|
if (this.rules) {
|
|
|
|
} else {
|
|
return this.name + ' ' + this.value.toCSS() + ';\n';
|
|
}
|
|
};
|