Files
less.js/test/less/import-inline.less
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

3 lines
213 B
Plaintext

@import url("import/import-test-c.less");// import inline should not float above this #1954
@import (inline) url("import/import-test-d.css") (min-width:600px);
@import (inline, css) url("import/invalid-css.less");