From 883aa5c8be4428e23fa9db08ab8486cecc982cba Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Thu, 20 Aug 2015 02:16:35 +0200 Subject: [PATCH] Fix for mixins declaration with space before colon. Allow any space character or even `{` and `}` (before and after capturing pattern correspondingly) as pattern boundaries instead of new lines only. In minified sources there might be no space, semicolon or line start, so we need to account that as well. --- src/lib/css-parse.html | 18 +++++------ src/lib/style-properties.html | 34 ++++++++++---------- test/unit/custom-style.html | 60 +++++++++++++++++++++++++++++++++-- 3 files changed, 83 insertions(+), 29 deletions(-) diff --git a/src/lib/css-parse.html b/src/lib/css-parse.html index a176d7c1c0..332857348e 100644 --- a/src/lib/css-parse.html +++ b/src/lib/css-parse.html @@ -43,7 +43,7 @@ n = {start: i+1, parent: p, previous: previous}; p.rules.push(n); break; - case this.CLOSE_BRACE: + case this.CLOSE_BRACE: //console.groupEnd(n.start); n.end = i+1; n = n.parent || root; @@ -84,9 +84,9 @@ if (r$) { for (var i=0, l=r$.length, r; (i .zazz { - border: 20px solid blue; + border: 20px solid blue; } @@ -126,6 +134,10 @@ + + + +

@@ -180,12 +192,32 @@ + + + + + + + + + +