2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

overhaul buttons

This commit is contained in:
Mark Otto
2012-12-19 22:25:56 -08:00
parent a932476f80
commit c38b7206eb
7 changed files with 163 additions and 337 deletions
+6 -14
View File
@@ -405,25 +405,17 @@
// Button backgrounds
// ------------------
.buttonBackground(@startColor, @endColor, @text-color: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
.buttonBackground(@background-color: #333, @text-color: #fff) {
color: @text-color;
text-shadow: @textShadow;
#gradient > .vertical(@startColor, @endColor);
border-color: @endColor @endColor darken(@endColor, 15%);
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) fadein(rgba(0,0,0,.1), 15%);
.reset-filter();
background-color: @background-color;
// in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active, &.disabled, &[disabled] {
color: @text-color;
background-color: @endColor;
}
// IE8 can't handle box-shadow to show active, so we darken a bit ourselves
&:hover,
&:active,
&.active {
background-color: darken(@endColor, 10%) e("\9");
color: @text-color;
background-color: darken(@background-color, 10%);
}
}