diff options
Diffstat (limited to 'tests/sass')
-rw-r--r-- | tests/sass/resources/css/mixins.css | 5 | ||||
-rw-r--r-- | tests/sass/resources/scss/mixins.scss | 11 | ||||
-rw-r--r-- | tests/sass/src/com/vaadin/sass/testcases/scss/Mixins.java | 10 |
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 |