summaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-10-12 17:07:26 +0300
committerMarc Englund <marc@vaadin.com>2012-10-15 16:02:20 +0300
commit16452cbb7fff0441cde4d2d303297e83e8c58ce1 (patch)
treed4abc1e23a8ee4a23b9c9fdf97172e3e1845ed49 /theme-compiler/tests
parent6075149eb323d9d63414e917b5b9d43519682217 (diff)
downloadvaadin-framework-16452cbb7fff0441cde4d2d303297e83e8c58ce1.tar.gz
vaadin-framework-16452cbb7fff0441cde4d2d303297e83e8c58ce1.zip
list append and contains for #9380
Originally c/76 (I413452d08b48a0fa21d027064ce2d35e687129cd) by Seba; received missing file, and fixed Change-Id: Ib814b13c6ce7bb6f29bdab2ee65274c1fade099e
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r--theme-compiler/tests/resources/css/listmodify.css23
-rw-r--r--theme-compiler/tests/resources/scss/listmodify.scss25
-rw-r--r--theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java17
3 files changed, 65 insertions, 0 deletions
diff --git a/theme-compiler/tests/resources/css/listmodify.css b/theme-compiler/tests/resources/css/listmodify.css
new file mode 100644
index 0000000000..b07d5d9eef
--- /dev/null
+++ b/theme-compiler/tests/resources/css/listmodify.css
@@ -0,0 +1,23 @@
+.v-button {
+ font-size: 12px;
+}
+
+.v-label {
+ font-size: 12px;
+}
+
+.v-button {
+ font-color: red;
+}
+
+.v-label {
+ font-color: red;
+}
+
+.v-textfield {
+ font-color: red;
+}
+
+.v-button {
+ background-color: black;
+} \ No newline at end of file
diff --git a/theme-compiler/tests/resources/scss/listmodify.scss b/theme-compiler/tests/resources/scss/listmodify.scss
new file mode 100644
index 0000000000..814f3156f8
--- /dev/null
+++ b/theme-compiler/tests/resources/scss/listmodify.scss
@@ -0,0 +1,25 @@
+$list : .v-button, .v-panel, .v-label;
+
+$basics : remove($list, .v-panel);
+
+@each $component in $basics{
+ .#{$component} {
+ font-size: 12px;
+ }
+}
+
+$items : append($basics, .v-textfield);
+
+@each $component in $items{
+ .#{$component} {
+ font-color: red;
+ }
+}
+
+$contains : contains($items, .v-button);
+
+@if($contains){
+ .v-button {
+ background-color: black;
+ }
+}
diff --git a/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java
new file mode 100644
index 0000000000..4a65591f83
--- /dev/null
+++ b/theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java
@@ -0,0 +1,17 @@
+package com.vaadin.sass.testcases.scss;
+
+import org.junit.Test;
+
+import com.vaadin.sass.AbstractTestBase;
+
+public class ListModify extends AbstractTestBase {
+
+ String scss = "/scss/listmodify.scss";
+ String css = "/css/listmodify.css";
+
+ @Test
+ public void testCompiler() throws Exception {
+ testCompiler(scss, css);
+ }
+
+}