mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 18:40:03 +00:00
Moves buttonBackground to mixins (issue 1292)
This commit is contained in:
parent
a1fc352cc2
commit
1c9db106fa
@ -35,31 +35,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Mixin for generating button backgrounds
|
|
||||||
// ---------------------------------------
|
|
||||||
.buttonBackground(@startColor, @endColor) {
|
|
||||||
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
|
|
||||||
.gradientBar(@startColor, @endColor);
|
|
||||||
|
|
||||||
// in these cases the gradient won't cover the background, so we override
|
|
||||||
&:hover, &:active, &.active, &.disabled {
|
|
||||||
background-color: @endColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
// called out separately because IE8 would ignore otherwise
|
|
||||||
&[disabled] {
|
|
||||||
background-color: @endColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
|
|
||||||
&:active,
|
|
||||||
&.active {
|
|
||||||
background-color: darken(@endColor, 10%) e("\9");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Base styles
|
// Base styles
|
||||||
// -----------
|
// -----------
|
||||||
|
|
||||||
|
@ -339,6 +339,29 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Mixin for generating button backgrounds
|
||||||
|
// ---------------------------------------
|
||||||
|
.buttonBackground(@startColor, @endColor) {
|
||||||
|
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
|
||||||
|
.gradientBar(@startColor, @endColor);
|
||||||
|
|
||||||
|
// in these cases the gradient won't cover the background, so we override
|
||||||
|
&:hover, &:active, &.active, &.disabled {
|
||||||
|
background-color: @endColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
// called out separately because IE8 would ignore otherwise
|
||||||
|
&[disabled] {
|
||||||
|
background-color: @endColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
|
||||||
|
&:active,
|
||||||
|
&.active {
|
||||||
|
background-color: darken(@endColor, 10%) e("\9");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// COMPONENT MIXINS
|
// COMPONENT MIXINS
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user