summaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests
diff options
context:
space:
mode:
authorSebastian Nyholm <sebastian@vaadin.com>2012-11-15 14:33:28 +0200
committerSebastian Nyholm <sebastian@vaadin.com>2012-11-15 14:51:42 +0200
commit7e458a4acf1276ae00872954e9082cc412bfa10a (patch)
treeb26d15964aeeb3174009cc25bb8a7c66ebc18d03 /theme-compiler/tests
parente54ff59fbe6a5452b469a355176351cd710663d1 (diff)
downloadvaadin-framework-7e458a4acf1276ae00872954e9082cc412bfa10a.tar.gz
vaadin-framework-7e458a4acf1276ae00872954e9082cc412bfa10a.zip
(#10182) Rule order not preserved when using parent reference in sass
Change-Id: Ief701eef3a262c4fd0c14241c54b3d57cb858027
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r--theme-compiler/tests/resources/css/parent-selector.css4
-rw-r--r--theme-compiler/tests/resources/scss/parent-selector.scss3
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ParentSelector.java6
3 files changed, 10 insertions, 3 deletions
diff --git a/theme-compiler/tests/resources/css/parent-selector.css b/theme-compiler/tests/resources/css/parent-selector.css
index 0330782fbf..e7e37e92ab 100644
--- a/theme-compiler/tests/resources/css/parent-selector.css
+++ b/theme-compiler/tests/resources/css/parent-selector.css
@@ -3,6 +3,10 @@ a {
text-decoration: none;
}
+a .sub {
+ color: blue;
+}
+
a:hover {
text-decoration: underline;
}
diff --git a/theme-compiler/tests/resources/scss/parent-selector.scss b/theme-compiler/tests/resources/scss/parent-selector.scss
index ee02f8bf76..68f66a4a27 100644
--- a/theme-compiler/tests/resources/scss/parent-selector.scss
+++ b/theme-compiler/tests/resources/scss/parent-selector.scss
@@ -1,6 +1,9 @@
a {
font-weight: bold;
text-decoration: none;
+ .sub {
+ color: blue;
+ }
&:hover { text-decoration: underline; }
body.firefox & { font-weight: normal; }
}
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ParentSelector.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ParentSelector.java
index e1e1fee3b4..ebe62fd678 100644
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ParentSelector.java
+++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ParentSelector.java
@@ -41,10 +41,10 @@ public class ParentSelector extends AbstractTestBase {
parser.parseStyleSheet(getClass().getResource(scss).getPath());
ScssStylesheet root = handler.getStyleSheet();
BlockNode blockNode = (BlockNode) root.getChildren().get(0);
- Assert.assertEquals(4, blockNode.getChildren().size());
- BlockNode nestedBlock1 = (BlockNode) blockNode.getChildren().get(2);
+ Assert.assertEquals(5, blockNode.getChildren().size());
+ BlockNode nestedBlock1 = (BlockNode) blockNode.getChildren().get(3);
Assert.assertEquals("&:hover", nestedBlock1.getSelectorList().get(0));
- BlockNode nestedBlock2 = (BlockNode) blockNode.getChildren().get(3);
+ BlockNode nestedBlock2 = (BlockNode) blockNode.getChildren().get(4);
Assert.assertEquals("body.firefox &", nestedBlock2.getSelectorList()
.get(0));
}