Skip to content

Commit

Permalink
Fix #54 Support STATEMENT_BLOCK as mixin call parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
racodond committed Aug 9, 2017
1 parent 5495532 commit 167d184
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public Tree ANY_WITHOUT_COMMA_SEPARATED_LIST() {
PSEUDO_SELECTOR(),
PARENTHESIS_BLOCK(),
BRACKET_BLOCK(),
STATEMENT_BLOCK(),
PERCENTAGE(),
DIMENSION(),
NUMBER(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,27 @@ public void stylesheet() throws Exception {
"}\n" +
".sprites(@sprites, @i + 1);\n" +
"}");

checkParsed("// declare detached ruleset\n" +
"@detached-ruleset: { background: red; };\n" +
"\n" +
"// use detached ruleset\n" +
".top {\n" +
" @detached-ruleset(); \n" +
"}");

checkParsed(".desktop-and-old-ie(@rules) {\n" +
" @media screen and (min-width: 1200px) { @rules(); }\n" +
" html.lt-ie9 & { @rules(); }\n" +
"}\n" +
"\n" +
"header {\n" +
" background-color: blue;\n" +
"\n" +
" .desktop-and-old-ie({\n" +
" background-color: red;\n" +
" });\n" +
"}");
}

private StyleSheetTree checkParsed(String toParse) {
Expand Down

0 comments on commit 167d184

Please sign in to comment.