From 62f5f3a0b59f40ae01f7d2dbaa8f2bc8a27e0c3f Mon Sep 17 00:00:00 2001 From: Dmitry Vibe Date: Mon, 8 May 2017 22:59:18 +0300 Subject: [PATCH] fix order of rules --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index f67e666..4ddd7d3 100644 --- a/index.js +++ b/index.js @@ -53,12 +53,14 @@ function processRule(rule, bubble) { child.selectors = selectors(rule, child); after = pickComment(child.prev(), after); after.after(child); + after = child; } else if ( child.type === 'atrule' ) { if ( bubble.indexOf(child.name) !== -1 ) { unwrapped = true; atruleChilds(rule, child); after = pickComment(child.prev(), after); after.after(child); + after = child; } } });