diff --git a/src/lib/css-parse.html b/src/lib/css-parse.html index 5a011f5e07..2199fdb778 100644 --- a/src/lib/css-parse.html +++ b/src/lib/css-parse.html @@ -137,7 +137,7 @@ }, _hasMixinRules: function(rules) { - return (rules[0].selector.indexOf(this.VAR_START) >= 0); + return rules[0].selector.indexOf(this.VAR_START) === 0; }, removeCustomProps: function(cssText) { diff --git a/src/lib/style-properties.html b/src/lib/style-properties.html index fd3e5e82a6..b007551bd5 100644 --- a/src/lib/style-properties.html +++ b/src/lib/style-properties.html @@ -166,7 +166,7 @@ p || ''; } } - return parts.join(';'); + return parts.filter(function(v) {return v;}).join(';'); }, applyProperties: function(rule, props) { diff --git a/test/unit/custom-style.html b/test/unit/custom-style.html index be50e91224..7c7b702e00 100644 --- a/test/unit/custom-style.html +++ b/test/unit/custom-style.html @@ -117,6 +117,18 @@ border: 20px solid blue; } + +
italic
@@ -143,6 +155,7 @@
+