forked from less/less.js
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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 less#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 less#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.
- Loading branch information
jurcovicovam
committed
Jul 22, 2014
1 parent
546bedd
commit 864c63d
Showing
8 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
this isn't very valid CSS. | ||
#import { | ||
color: #ff0000; | ||
} | ||
@media (min-width: 600px) { | ||
#css { color: yellow; } | ||
|
||
} | ||
this isn't very valid CSS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
@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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters