Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / resources / themes / stylesheets / ext4 / default / mixins / _color-by-background.scss
1 /**
2  *
3  */
4 @mixin color-by-background($bg-color, $contrast: 70%, $default-color: null, $bevel-text: true) {
5     @if ($default-color != null) {
6         color: $default-color;
7     } @else {
8         @if (lightness($bg-color) > 40) {
9             color: darken($bg-color, $contrast);
10         }
11         @else {
12             color: lighten($bg-color, $contrast)
13         }
14     }
15
16     @if ($bevel-text != false) {
17         @if (lightness($bg-color) < 40) {
18             @include text-shadow(rgba(0,0,0,.5) 0 -1px 0);
19         } @else {
20             @include text-shadow(rgba(255,255,255,.25) 0 1px 0);
21         }
22     }
23 }