summaryrefslogtreecommitdiffstats
path: root/tests/sass
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-08-29 18:19:21 +0300
committerMarc Englund <marc@vaadin.com>2012-08-29 18:19:21 +0300
commit269746aa7843e41a7aa4dd3cf9da731dc18a7d43 (patch)
tree6542c377886d48c9333ef9d8c7be4fa73f4d503b /tests/sass
parentcac34cbc8f8ca82c44525985b4b422d89388ca79 (diff)
downloadvaadin-framework-269746aa7843e41a7aa4dd3cf9da731dc18a7d43.tar.gz
vaadin-framework-269746aa7843e41a7aa4dd3cf9da731dc18a7d43.zip
Applied patch fixing #9347 (mixin w/ args + nested blocks), includes test
Diffstat (limited to 'tests/sass')
-rw-r--r--tests/sass/resources/css/mixins.css5
-rw-r--r--tests/sass/resources/scss/mixins.scss11
-rw-r--r--tests/sass/src/com/vaadin/sass/testcases/scss/Mixins.java10
3 files changed, 22 insertions, 4 deletions
diff --git a/tests/sass/resources/css/mixins.css b/tests/sass/resources/css/mixins.css
index cd5c9b85aa..5c727c193b 100644
--- a/tests/sass/resources/css/mixins.css
+++ b/tests/sass/resources/css/mixins.css
@@ -8,6 +8,11 @@
font-weight: bold;
}
+.main .details {
+ font-size: 14px;
+ font-weight: bold;
+}
+
.footer {
border: 2px solid black;
-webkit-border-radius: 10px;
diff --git a/tests/sass/resources/scss/mixins.scss b/tests/sass/resources/scss/mixins.scss
index f16c9a0e06..52e03d62c1 100644
--- a/tests/sass/resources/scss/mixins.scss
+++ b/tests/sass/resources/scss/mixins.scss
@@ -16,6 +16,7 @@
.main {
@include rounded-borders(1px);
@include font-settings;
+ @include main-details(14px);
}
.footer {
@@ -41,4 +42,14 @@
}
@include font-settings;
}
+
+@mixin main-details($size){
+ .details {
+ font: {
+ size : $size;
+ weight: bold;
+ }
+ }
+}
+
@include layout; \ No newline at end of file
diff --git a/tests/sass/src/com/vaadin/sass/testcases/scss/Mixins.java b/tests/sass/src/com/vaadin/sass/testcases/scss/Mixins.java
index c801ab1437..05b3d3c83e 100644
--- a/tests/sass/src/com/vaadin/sass/testcases/scss/Mixins.java
+++ b/tests/sass/src/com/vaadin/sass/testcases/scss/Mixins.java
@@ -69,7 +69,7 @@ public class Mixins extends AbstractTestBase {
Assert.assertEquals(4, mixinDefNode1.getChildren().size());
BlockNode mainBlockNode = (BlockNode) root.getChildren().get(2);
- Assert.assertEquals(2, mainBlockNode.getChildren().size());
+ Assert.assertEquals(3, mainBlockNode.getChildren().size());
MixinNode mixinNode0MainBlock = (MixinNode) mainBlockNode.getChildren()
.get(0);
Assert.assertEquals("rounded-borders", mixinNode0MainBlock.getName());
@@ -82,6 +82,11 @@ public class Mixins extends AbstractTestBase {
Assert.assertEquals("font-settings", mixinNOde1MainBlock.getName());
Assert.assertTrue(mixinNOde1MainBlock.getArglist().isEmpty());
+ MixinNode mixinNOde2MainBlock = (MixinNode) mainBlockNode.getChildren()
+ .get(2);
+ Assert.assertEquals("main-details", mixinNOde2MainBlock.getName());
+ Assert.assertTrue(mixinNOde1MainBlock.getArglist().isEmpty());
+
MixinNode mixinNode1MainBlock = (MixinNode) mainBlockNode.getChildren()
.get(1);
Assert.assertTrue(mixinNode1MainBlock.getArglist().isEmpty());
@@ -103,9 +108,6 @@ public class Mixins extends AbstractTestBase {
Assert.assertTrue(root.getChildren().get(4).getChildren().get(3) instanceof MediaNode);
Assert.assertTrue(root.getChildren().get(4).getChildren().get(4) instanceof MixinNode);
- MixinNode topLevelMixin = (MixinNode) root.getChildren().get(5);
- Assert.assertEquals("layout", topLevelMixin.getName());
-
}
@Test