aboutsummaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests
diff options
context:
space:
mode:
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r--theme-compiler/tests/resources/css/variables.css1
-rw-r--r--theme-compiler/tests/resources/scss/variables.scss3
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Variables.java6
3 files changed, 7 insertions, 3 deletions
diff --git a/theme-compiler/tests/resources/css/variables.css b/theme-compiler/tests/resources/css/variables.css
index d54ae6cd30..ae5ac5e01c 100644
--- a/theme-compiler/tests/resources/css/variables.css
+++ b/theme-compiler/tests/resources/css/variables.css
@@ -3,6 +3,7 @@
color: #0000ff;
color1: #0000d1;
font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
+ font-size: 12px;
}
.border {
diff --git a/theme-compiler/tests/resources/scss/variables.scss b/theme-compiler/tests/resources/scss/variables.scss
index 60acc5dd10..2448aaddb9 100644
--- a/theme-compiler/tests/resources/scss/variables.scss
+++ b/theme-compiler/tests/resources/scss/variables.scss
@@ -1,6 +1,7 @@
$blue: #3bbfce;
$margin: 8px;
$chameleon-font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
+$font: 12px;
.content-navigation {
border-color: $blue;
@@ -8,6 +9,8 @@ $chameleon-font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode"
color: $blue;
color1: darken($blue, 9%);
font-family: $chameleon-font-family;
+ $font-size: $font;
+ font-size: $font-size;
}
.border {
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Variables.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Variables.java
index d56a9dee9d..32984c53ec 100644
--- a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Variables.java
+++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Variables.java
@@ -45,7 +45,7 @@ public class Variables 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());
VariableNode varNode1 = (VariableNode) root.getChildren().get(0);
Assert.assertEquals("blue", varNode1.getName());
@@ -58,7 +58,7 @@ public class Variables extends AbstractTestBase {
Assert.assertEquals(8f, varNode2.getExpr().getFloatValue());
Assert.assertEquals("px", varNode2.getExpr().getDimensionUnitText());
- BlockNode blockNode1 = (BlockNode) root.getChildren().get(4);
+ BlockNode blockNode1 = (BlockNode) root.getChildren().get(5);
Assert.assertEquals(3, blockNode1.getChildren().size());
RuleNode ruleNode1Block1 = (RuleNode) blockNode1.getChildren().get(2);
Assert.assertEquals("border-color", ruleNode1Block1.getVariable());
@@ -72,7 +72,7 @@ public class Variables extends AbstractTestBase {
.getValue().getLexicalUnitType());
Assert.assertEquals("blue", ruleNode2Block1.getValue().getStringValue());
- BlockNode blockNode2 = (BlockNode) root.getChildren().get(4);
+ BlockNode blockNode2 = (BlockNode) root.getChildren().get(5);
RuleNode ruleNode1Block2 = (RuleNode) blockNode2.getChildren().get(0);
Assert.assertEquals("padding", ruleNode1Block2.getVariable());
Assert.assertEquals(SCSSLexicalUnit.SCSS_VARIABLE, ruleNode1Block2