2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03:00

Remove black border on buttons in IE7:

1. Removed borders on .btn and increased line-height 2px to compensate
2. Set buttons to use the endColor of the gradient as the background-color by default for extra contrast between button and background
3. Set a 5% darker background-color on hover of buttons just for IE7
This commit is contained in:
Mark Otto
2012-03-25 14:28:24 -07:00
parent a62810918f
commit c0f28d81b0
4 changed files with 46 additions and 0 deletions
+5
View File
@@ -28,6 +28,10 @@
// Give IE7 some love
.ie7-restore-left-whitespace();
/* Remove the border to prevent IE7's black border on input:focus */
*border: 0;
*line-height: 20px;
}
// Hover state
@@ -35,6 +39,7 @@
color: @grayDark;
text-decoration: none;
background-color: darken(@white, 10%);
*background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
background-position: 0 -15px;
// transition is only when going to hover, otherwise the background
+2
View File
@@ -427,10 +427,12 @@
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
.gradientBar(@startColor, @endColor);
.reset-filter();
*background-color: @endColor; /* Darken IE7 buttons by default so they stand out more given they won't have borders */
// in these cases the gradient won't cover the background, so we override
&:hover, &:active, &.active, &.disabled, &[disabled] {
background-color: @endColor;
*background-color: darken(@endColor, 5%);
}
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves