Slide 45
Slide 45 text
// Mixin w/ Color Maths
// ------------------------------------------------------------------
@mixin buttonBackground($startColor, $endColor) {
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
@include gradientBar($startColor, $endColor);
@include reset-filter();
// in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active {
background-color: $endColor;
}
&.disabled, &[disabled] {
&:hover {
@include gradientBar($startColor, $endColor);
@include reset-filter();
}
}
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
&:active,
&.active {
background-color: darken($endColor, 10%) #{"\9"};
@include gradientBar($endColor, $startColor);
}
}