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

More button tweaks

This commit is contained in:
Mark Otto
2012-12-19 22:54:04 -08:00
parent afef81c0d7
commit 9b4e5746a4
5 changed files with 200 additions and 56 deletions
+33 -4
View File
@@ -405,17 +405,46 @@
// Button backgrounds
// ------------------
.buttonBackground(@background-color: #333, @text-color: #fff) {
/*.buttonBackground(@startColor, @endColor, @text-color: #fff, @textShadow: 0 -1px 0 rgba(0,0,0,.25)) {
color: @text-color;
background-color: @background-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();
// 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
&:active,
&.active {
background-color: darken(@endColor, 10%) e("\9");
}
}*/
// Button backgrounds
// ------------------
.buttonBackground(@background-start, @background-end, @text-color: #fff, @text-shadow: 0 -1px 0 rgba(0,0,0,.25)) {
color: @text-color;
text-shadow: @text-shadow;
#gradient > .vertical(@background-start, @background-end);
border-color: darken(@background-end, 5%);
&:hover,
&:active,
&.active {
color: @text-color;
background-color: darken(@background-color, 10%);
background-position: 0 -15px;
background-color: @background-end;
}
&:active,
&.active {
background-image: none;
}
}