summaryrefslogtreecommitdiffstats
path: root/theme-compiler/tests/resources/scss
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2012-09-21 11:52:52 +0300
committerMarc Englund <marc@vaadin.com>2012-09-21 11:53:22 +0300
commit8b28ea439cf09b69574009337c2659dd653d3760 (patch)
treec7e28e1e29b5608115b84f7b0b0cc334fd312455 /theme-compiler/tests/resources/scss
parent9500a714336d6f08b47f7cba980fc82faf318ef3 (diff)
downloadvaadin-framework-8b28ea439cf09b69574009337c2659dd653d3760.tar.gz
vaadin-framework-8b28ea439cf09b69574009337c2659dd653d3760.zip
Big SassCompiler change, fixes #9411 #9489 partials for #9354 #9545 #9380 (applied patch)
Diffstat (limited to 'theme-compiler/tests/resources/scss')
-rw-r--r--theme-compiler/tests/resources/scss/control-directives.scss22
-rw-r--r--theme-compiler/tests/resources/scss/functions.scss4
-rw-r--r--theme-compiler/tests/resources/scss/mixins.scss8
-rw-r--r--theme-compiler/tests/resources/scss/parent-selector.scss10
-rw-r--r--theme-compiler/tests/resources/scss/remove-directive.scss16
5 files changed, 54 insertions, 6 deletions
diff --git a/theme-compiler/tests/resources/scss/control-directives.scss b/theme-compiler/tests/resources/scss/control-directives.scss
index f9773bb108..6cf05518bf 100644
--- a/theme-compiler/tests/resources/scss/control-directives.scss
+++ b/theme-compiler/tests/resources/scss/control-directives.scss
@@ -1,13 +1,17 @@
$borderWeight : solid;
-@each $animal in puma, sea-slug, egret, salamander {
- .#{$animal}-icon #animal, .menu {
- background-image: url('/images/#{$animal}.png');
- @include logo(10px);
- @if 1+1 == 2 { border: 1px solid; }
- }
+@mixin animals($list : puma, sea-slug, egret, salamander){
+ @each $animal in $list {
+ .#{$animal}-icon #animal, .menu {
+ background-image: url('/images/#{$animal}.png');
+ @include logo(10px);
+ @if 1+1 == 2 { border: 1px solid; }
+ }
+ }
}
+@include animals;
+
.trueIf {
@if solid != dotted { border: 1px $borderWeight; }
@else { border: 2px solid; }
@@ -24,6 +28,12 @@ $borderWeight : solid;
@else { border: 3px solid; }
}
+@each $thing in cube, triangle, circle{
+ .#{$thing}-icon {
+ background-image: url('/images/#{$thing}.png');
+ }
+}
+
@mixin logo($size){
font: {
size: $size;
diff --git a/theme-compiler/tests/resources/scss/functions.scss b/theme-compiler/tests/resources/scss/functions.scss
index abf6f6187d..b9860311ea 100644
--- a/theme-compiler/tests/resources/scss/functions.scss
+++ b/theme-compiler/tests/resources/scss/functions.scss
@@ -1,3 +1,5 @@
+$base-color : hsl(33, 7%, 89%);
+$app-bg-color : lighten($base-color, 6%);
.main {
margin: abs(-2px);
border: ceil(10.4px);
@@ -11,6 +13,8 @@
color: darken(#800, 20%);
color: lighten(#880000, 20%);
color: lighten(#800, 20%);
+ color : $base-color;
+ color : $app-bg-color;
}
diff --git a/theme-compiler/tests/resources/scss/mixins.scss b/theme-compiler/tests/resources/scss/mixins.scss
index 0fbfed6f93..1f9cdf03de 100644
--- a/theme-compiler/tests/resources/scss/mixins.scss
+++ b/theme-compiler/tests/resources/scss/mixins.scss
@@ -54,4 +54,12 @@ $mixinVar : 1px;
}
}
+.banner {
+ @include fontType(1px solid black);
+}
+
+@mixin fontType($border){
+ border : $border;
+}
+
@include layout; \ No newline at end of file
diff --git a/theme-compiler/tests/resources/scss/parent-selector.scss b/theme-compiler/tests/resources/scss/parent-selector.scss
index 3d0f694801..60e7608c07 100644
--- a/theme-compiler/tests/resources/scss/parent-selector.scss
+++ b/theme-compiler/tests/resources/scss/parent-selector.scss
@@ -11,4 +11,14 @@ a {
font-weight: bold;
&:hover { color: red; }
}
+}
+
+@mixin parent {
+ &:hover {
+ color: blue;
+ }
+}
+
+.mixin-parent {
+ @include parent;
} \ No newline at end of file
diff --git a/theme-compiler/tests/resources/scss/remove-directive.scss b/theme-compiler/tests/resources/scss/remove-directive.scss
new file mode 100644
index 0000000000..cbfca9dcda
--- /dev/null
+++ b/theme-compiler/tests/resources/scss/remove-directive.scss
@@ -0,0 +1,16 @@
+$animals : platypus, rhinoceros, llama, duck, duck;
+$remove : duck;
+
+@each $animal in $animals {
+ .animals .#{$animal}-icon {
+ background-image: url('/images/#{$animal}.png');
+ }
+}
+
+remove($animals, $remove, space);
+
+@each $animal in $animals{
+ .exotic-animals .#{$animal}-icon {
+ background-image: url('/images/#{$animal}.png');
+ }
+}