@mixin radius ($radius) { @if $supports-border-radius == true { -webkit-border-radius: $radius; -moz-border-radius: $radius; border-radius: $radius; behavior:url(css/PIE.htc); } } @mixin gradient ($color1, $color2) { background-image: -moz-linear-gradient(top, $color1, $color2); background-image: -ms-linear-gradient(top, $color1, $color2); background-image: -webkit-gradient(linear, 0 0, 0 100%, from($color1), to($color2)); background-image: -webkit-linear-gradient(top, $color1, $color2); background-image: -o-linear-gradient(top, $color1, $color2); background-image: linear-gradient(top, $color1, $color2); background-repeat: repeat-x; -pie-background: linear-gradient($color1, $color2); } @function linear-gradient-bevel($direction, $bg-color) { @return linear-gradient($direction, color_stops( lighten($bg-color, 15%), lighten($bg-color, 8%) 30%, $bg-color 65%, darken($bg-color, 6%) )); } @function linear-gradient-glossy($direction, $bg-color) { @return linear-gradient($direction, color_stops( lighten($bg-color, 15%), lighten($bg-color, 5%) 50%, $bg-color 51%, darken($bg-color, 5%) )); } @function linear-gradient-recessed($direction, $bg-color) { @return linear-gradient($direction, color_stops( darken($bg-color, 10%), darken($bg-color, 5%) 10%, $bg-color 65%, lighten($bg-color, .5%) )); } @function linear-gradient-matte($direction, $bg-color) { @return linear-gradient($direction, color_stops( lighten($bg-color, 3%), darken($bg-color, 4%) )); } @function linear-gradient-matte-reverse($direction, $bg-color) { @return linear-gradient($direction, color_stops( darken($bg-color, 6%), lighten($bg-color, 4%) )); } @function linear-gradient-menu-bevel($direction, $bg-color) { @return linear-gradient($direction, color_stops( lighten($bg-color, 65%), lighten($bg-color, 40%) 30%, $bg-color 95%, $bg-color )); } @function linear-gradient-panel-title($direction, $bg-color) { @return linear-gradient($direction, color_stops( lighten($bg-color, 28%), lighten($bg-color, 2%) 44%, $bg-color 47%, $bg-color )); } @function linear-gradient-btn-glossy($direction, $bg-color) { @return linear-gradient($direction, color_stops( lighten($bg-color, 50%) 0%, lighten($bg-color, 45%) 13%, lighten($bg-color, 25%) 53%, darken($bg-color, 3%) 60%, $bg-color 80%, lighten($bg-color, 7%) 100% )); } @mixin background-gradient($bg-color, $type: $base-gradient, $direction: top) { @if $base-gradient != null and $bg-color != transparent { $gradient: null; //color_stops @if type-of($type) == "list" { $gradient: linear-gradient($direction, $type); } //default gradients @else if $type == bevel { $gradient: linear-gradient-bevel($direction, $bg-color); } @else if $type == glossy { $gradient: linear-gradient-glossy($direction, $bg-color); } @else if $type == recessed { $gradient: linear-gradient-recessed($direction, $bg-color); } @else if $type == matte { $gradient: linear-gradient-matte($direction, $bg-color); } @else if $type == matte-reverse { $gradient: linear-gradient-matte-reverse($direction, $bg-color); } @else if $type == menu-bevel { $gradient: linear-gradient-menu-bevel($direction, $bg-color); } @else if $type == panel-title { $gradient: linear-gradient-panel-title($direction, $bg-color); } @else if $type == btn-glossy { $gradient: linear-gradient-btn-glossy($direction, $bg-color); } @if $gradient != null { @include background-image($gradient); // @include filter-gradient(#f2f1ec, #66f1ec, vertical); -pie-background: $gradient; } } }