diff options
author | Henri Sara <hesara@vaadin.com> | 2012-11-26 12:36:46 +0200 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2012-11-26 12:37:37 +0200 |
commit | 78bfb5cb1cc72164e73cf7919501fa22ba05445d (patch) | |
tree | 8e0eec4e643a9d691146b56c92797c090463bdd7 /theme-compiler/tests | |
parent | b010b21a15dfd47790255e36122d3b30682d4990 (diff) | |
download | vaadin-framework-78bfb5cb1cc72164e73cf7919501fa22ba05445d.tar.gz vaadin-framework-78bfb5cb1cc72164e73cf7919501fa22ba05445d.zip |
Keep block order when unnesting (#10309)
Change-Id: I5a7e6b74a55176799e85c943a128d9aab0db0876
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r-- | theme-compiler/tests/resources/css/nesting.css | 8 | ||||
-rw-r--r-- | theme-compiler/tests/resources/scss/nesting.scss | 12 | ||||
-rw-r--r-- | theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java | 4 |
3 files changed, 23 insertions, 1 deletions
diff --git a/theme-compiler/tests/resources/css/nesting.css b/theme-compiler/tests/resources/css/nesting.css index b3861a0131..e1cdf3a579 100644 --- a/theme-compiler/tests/resources/css/nesting.css +++ b/theme-compiler/tests/resources/css/nesting.css @@ -44,4 +44,12 @@ .main .second.third .fourth { color: black; +} + +.root .first-block .nested { + order: first; +} + +.root .last-block { + order: last; }
\ No newline at end of file diff --git a/theme-compiler/tests/resources/scss/nesting.scss b/theme-compiler/tests/resources/scss/nesting.scss index 0336c9e86d..1fefe0dde0 100644 --- a/theme-compiler/tests/resources/scss/nesting.scss +++ b/theme-compiler/tests/resources/scss/nesting.scss @@ -37,4 +37,16 @@ color: black; } } +} + +.root { + .first-block { + .nested { + order: first; + } + } + + .last-block { + order: last; + } }
\ No newline at end of file diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java index 109182f608..bdc6e63391 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java +++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java @@ -42,7 +42,7 @@ public class Nesting extends AbstractTestBase { parser.setDocumentHandler(handler); parser.parseStyleSheet(getClass().getResource(scss).getPath()); ScssStylesheet root = handler.getStyleSheet(); - Assert.assertEquals(5, root.getChildren().size()); + Assert.assertEquals(6, root.getChildren().size()); BlockNode blockNode0 = (BlockNode) root.getChildren().get(0); Assert.assertEquals(2, blockNode0.getChildren().size()); @@ -78,6 +78,8 @@ public class Nesting extends AbstractTestBase { BlockNode nestednestedBlockInBlock4 = (BlockNode) nestedBlockInBlock3 .getChildren().get(1); Assert.assertEquals(1, nestednestedBlockInBlock4.getChildren().size()); + + // the parsing of the last block is not checked in detail } @Test |