Commit Graph

6 Commits

Author SHA1 Message Date
Luke Page
ddba055461 Fix merge errors and node tests 2014-08-14 18:03:59 +01:00
jurcovicovam
864c63d27b Fix ordering of @import and @charset rules #1954 #2013
The genCss method of ruleset.js splits child nodes into two groups:
* rules,
* rulesets.

Rules are always printed first and have special handling for last rule.
Rulesets are always printed second. Wrong ordering was caused by the
condition that determined what is rule and what is ruleset.

Issue #2013: The condition made no difference between @charset and @page,
because both are compiled into tree.Directive nodes. I added isRulesetLike
method to the tree.Directive to differentiate between them.

Issue #1954: The condition treated all tree.Anonymous types as rules and
caused them to float up. That is incorrect, because `@import (inline)` is
compiled into tree.Anonymous too, but should be treated as ruleset and
stay where it is.
2014-07-22 14:46:58 +02:00
Luke Page
f032f20206 Fix error in previous commit 2013-07-16 20:24:44 +01:00
Luke Page
2a0df97291 move rule/ruleset re-ordering away from toCSS 2013-07-15 23:05:27 +01:00
Luke Page
037cdb5916 fix tests 2013-07-15 22:03:52 +01:00
Luke Page
6fc6dc2301 Add import inline option. Fixes #1209 2013-07-05 06:48:47 +01:00