From 16452cbb7fff0441cde4d2d303297e83e8c58ce1 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Fri, 12 Oct 2012 17:07:26 +0300 Subject: list append and contains for #9380 Originally c/76 (I413452d08b48a0fa21d027064ce2d35e687129cd) by Seba; received missing file, and fixed Change-Id: Ib814b13c6ce7bb6f29bdab2ee65274c1fade099e --- theme-compiler/tests/resources/css/listmodify.css | 23 ++++++++++++++++++++ .../tests/resources/scss/listmodify.scss | 25 ++++++++++++++++++++++ .../com/vaadin/sass/testcases/scss/ListModify.java | 17 +++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 theme-compiler/tests/resources/css/listmodify.css create mode 100644 theme-compiler/tests/resources/scss/listmodify.scss create mode 100644 theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ListModify.java (limited to 'theme-compiler/tests') 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); + } + +} -- cgit v1.2.3