Convert property merging to the new agreed syntax of +:

This commit is contained in:
Luke Page
2013-04-30 20:54:06 +01:00
parent 577d24cc97
commit 5cb5f561c8
5 changed files with 40 additions and 62 deletions

View File

@@ -20,7 +20,7 @@ tree.Rule.prototype = {
this.value = visitor.visit(this.value);
},
toCSS: function (env) {
if (this.variable) { return "" }
if (this.variable) { return ""; }
else {
try {
return this.name + (env.compress ? ':' : ': ') +

View File

@@ -178,7 +178,8 @@ tree.Ruleset.prototype = {
debugInfo, // Line number debugging
rule;
this.mergeRules();
this.mergeRules();
// Compile rules and rulesets
for (var i = 0; i < this.rules.length; i++) {
rule = this.rules[i];
@@ -468,8 +469,7 @@ tree.Ruleset.prototype = {
if ((rule instanceof tree.Rule) && rule.merge) {
key = [rule.name,
rule.important ? "!" : "",
rule.merge].join(",");
rule.important ? "!" : ""].join(",");
if (!groups[key]) {
parts = groups[key] = [];
@@ -487,7 +487,7 @@ tree.Ruleset.prototype = {
if (parts.length > 1) {
rule = parts[0];
rule.value = new ((rule.merge === ' ') ? tree.Expression : tree.Value)(parts.map(function (p) {
rule.value = new (tree.Value)(parts.map(function (p) {
return p.value;
}));
}