mirror of
https://github.com/less/less.js.git
synced 2026-01-23 06:07:56 -05:00
simplified code-gen loop
This commit is contained in:
@@ -16,21 +16,17 @@ node.Ruleset.prototype = {
|
||||
env.frames.unshift(this);
|
||||
|
||||
for (var i = 0; i < this.rules.length; i++) {
|
||||
if (this.rules[i] instanceof node.Ruleset) { continue }
|
||||
|
||||
if (this.rules[i].toCSS) {
|
||||
rules.push(this.rules[i].toCSS(env));
|
||||
if (this.rules[i] instanceof node.Ruleset) {
|
||||
rulesets.push(this.rules[i].toCSS(path, env));
|
||||
} else {
|
||||
if (this.rules[i].value) {
|
||||
if (this.rules[i].toCSS) {
|
||||
rules.push(this.rules[i].toCSS(env));
|
||||
} else if (this.rules[i].value) {
|
||||
rules.push(this.rules[i].value.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.rules.length; i++) {
|
||||
if (! (this.rules[i] instanceof node.Ruleset)) { continue }
|
||||
rulesets.push(this.rules[i].toCSS(path, env));
|
||||
}
|
||||
if (rules.length > 0) {
|
||||
if (path.length > 0) {
|
||||
css.push(path.join('').trim(),
|
||||
|
||||
Reference in New Issue
Block a user