summaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests
diff options
context:
space:
mode:
authorMika Murtojarvi <mika@vaadin.com>2013-11-08 11:23:35 +0200
committerVaadin Code Review <review@vaadin.com>2013-11-08 10:59:26 +0000
commita3aa6cc93e22fd6ff37ea6f3aa91810cab2aa624 (patch)
tree072c3db692a0a5f2a25a59ad57e417f8ba1f805d /theme-compiler/tests
parent13858578966dad8cf5a6f10448b42961817beafc (diff)
downloadvaadin-framework-a3aa6cc93e22fd6ff37ea6f3aa91810cab2aa624.tar.gz
vaadin-framework-a3aa6cc93e22fd6ff37ea6f3aa91810cab2aa624.zip
Fixes for sass compiler, handling mixins (#11288).
Keyframe selectors can now be comma-separated lists, interpolation unquotes a quoted string and the parameters of an @include are no longer lost. Change-Id: I2622aca7471adc8004371affbb803d850e801307
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r--theme-compiler/tests/resources/automatic/css/interpolation-singlequote.css1
-rw-r--r--theme-compiler/tests/resources/automatic/css/mixin-keyframes.css10
-rw-r--r--theme-compiler/tests/resources/automatic/scss/interpolation-singlequote.scss7
-rw-r--r--theme-compiler/tests/resources/automatic/scss/mixin-keyframes.scss14
4 files changed, 32 insertions, 0 deletions
diff --git a/theme-compiler/tests/resources/automatic/css/interpolation-singlequote.css b/theme-compiler/tests/resources/automatic/css/interpolation-singlequote.css
new file mode 100644
index 0000000000..58c6a3d37a
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/css/interpolation-singlequote.css
@@ -0,0 +1 @@
+body { background-color: white; } \ No newline at end of file
diff --git a/theme-compiler/tests/resources/automatic/css/mixin-keyframes.css b/theme-compiler/tests/resources/automatic/css/mixin-keyframes.css
new file mode 100644
index 0000000000..c1f2ccd6c0
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/css/mixin-keyframes.css
@@ -0,0 +1,10 @@
+@-webkit-keyframes fade-in {
+ 0% { opacity: 0; }
+ 20% , 50%,100% { opacity: 1; }
+ 30%, 75% { opacity: 0; }
+}
+@-moz-keyframes fade-in {
+ 0% { opacity: 0; }
+ 20% , 50%,100% { opacity: 1; }
+ 30%, 75% { opacity: 0; }
+} \ No newline at end of file
diff --git a/theme-compiler/tests/resources/automatic/scss/interpolation-singlequote.scss b/theme-compiler/tests/resources/automatic/scss/interpolation-singlequote.scss
new file mode 100644
index 0000000000..4cdd7bf165
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/scss/interpolation-singlequote.scss
@@ -0,0 +1,7 @@
+@mixin bgcolor ($name, $color) {
+ #{$name}{
+ background-color: $color;
+ }
+}
+
+@include bgcolor('body', white);
diff --git a/theme-compiler/tests/resources/automatic/scss/mixin-keyframes.scss b/theme-compiler/tests/resources/automatic/scss/mixin-keyframes.scss
new file mode 100644
index 0000000000..931d102e3f
--- /dev/null
+++ b/theme-compiler/tests/resources/automatic/scss/mixin-keyframes.scss
@@ -0,0 +1,14 @@
+@mixin keyframes ($name) {
+ @-webkit-keyframes #{$name} {
+ @content;
+ }
+ @-moz-keyframes #{$name} {
+ @content;
+ }
+}
+
+@include keyframes("fade-in") {
+ 0% {opacity: 0;}
+ 20% , 50%,100%{opacity: 1;}
+ 30%, 75% {opacity: 0;}
+} \ No newline at end of file