From a3aa6cc93e22fd6ff37ea6f3aa91810cab2aa624 Mon Sep 17 00:00:00 2001 From: Mika Murtojarvi Date: Fri, 8 Nov 2013 11:23:35 +0200 Subject: 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 --- .../resources/automatic/css/interpolation-singlequote.css | 1 + .../tests/resources/automatic/css/mixin-keyframes.css | 10 ++++++++++ .../automatic/scss/interpolation-singlequote.scss | 7 +++++++ .../tests/resources/automatic/scss/mixin-keyframes.scss | 14 ++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 theme-compiler/tests/resources/automatic/css/interpolation-singlequote.css create mode 100644 theme-compiler/tests/resources/automatic/css/mixin-keyframes.css create mode 100644 theme-compiler/tests/resources/automatic/scss/interpolation-singlequote.scss create mode 100644 theme-compiler/tests/resources/automatic/scss/mixin-keyframes.scss (limited to 'theme-compiler/tests') 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 -- cgit v1.2.3