From 970b2efaa1416689f537c7752c11e9062f77974a Mon Sep 17 00:00:00 2001 From: Haijian Wang Date: Thu, 28 Feb 2013 10:17:40 +0200 Subject: support @content directive for Sass compiler (Ticket #10207) Change-Id: I8037e1d64afd1ce2044d89d3bdcf408f6162727c --- .../css/mixin-content-directive-with-vars.css | 5 +++ .../automatic/css/mixin-content-directive.css | 20 +++++++++++ .../scss/mixin-content-directive-with-vars.scss | 9 +++++ .../automatic/scss/mixin-content-directive.scss | 40 ++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 theme-compiler/tests/resources/automatic/css/mixin-content-directive-with-vars.css create mode 100644 theme-compiler/tests/resources/automatic/css/mixin-content-directive.css create mode 100644 theme-compiler/tests/resources/automatic/scss/mixin-content-directive-with-vars.scss create mode 100644 theme-compiler/tests/resources/automatic/scss/mixin-content-directive.scss (limited to 'theme-compiler/tests') diff --git a/theme-compiler/tests/resources/automatic/css/mixin-content-directive-with-vars.css b/theme-compiler/tests/resources/automatic/css/mixin-content-directive-with-vars.css new file mode 100644 index 0000000000..799d6ae90c --- /dev/null +++ b/theme-compiler/tests/resources/automatic/css/mixin-content-directive-with-vars.css @@ -0,0 +1,5 @@ +.colors { + background-color: blue; + color: white; + border-color: blue; +} \ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/css/mixin-content-directive.css b/theme-compiler/tests/resources/automatic/css/mixin-content-directive.css new file mode 100644 index 0000000000..07813d1c99 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/css/mixin-content-directive.css @@ -0,0 +1,20 @@ +.foobar { + color: red; +} + +.foobar { + background-color: blue; +} + +* html #logo { + background-image: url(/logo.gif); +} + +* html .link { + color: blue; +} + +.foobar { + color: red; + color: red; +} \ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/mixin-content-directive-with-vars.scss b/theme-compiler/tests/resources/automatic/scss/mixin-content-directive-with-vars.scss new file mode 100644 index 0000000000..e7e0c3b7e6 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/mixin-content-directive-with-vars.scss @@ -0,0 +1,9 @@ +$color: white; +@mixin colors($color: blue) { + background-color: $color; + @content; + border-color: $color; +} +.colors { + @include colors { color: $color; } +} \ No newline at end of file diff --git a/theme-compiler/tests/resources/automatic/scss/mixin-content-directive.scss b/theme-compiler/tests/resources/automatic/scss/mixin-content-directive.scss new file mode 100644 index 0000000000..71217cb814 --- /dev/null +++ b/theme-compiler/tests/resources/automatic/scss/mixin-content-directive.scss @@ -0,0 +1,40 @@ +@mixin my-mixin { + .foobar { + @content; + } +} + +@include my-mixin { + color: red; +} + +@include my-mixin { + background-color: blue; +} + +@mixin apply-to-ie6-only { + * html { + @content; + } +} +@include apply-to-ie6-only { + #logo { + background-image: url(/logo.gif); + } +} +@include apply-to-ie6-only { + .link { + color: blue; + } +} + +@mixin mixin-multi-contents { + .foobar { + @content; + @content; + } +} + +@include mixin-multi-contents { + color: red; +} \ No newline at end of file -- cgit v1.2.3