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

Cleans up IE7 inline margins for buttons and adds them for sprites, also fixes button padding for large/small sizes

This commit is contained in:
Pete Hopkins
2012-01-27 14:17:06 -05:00
parent 43f1a42f7f
commit 347a15b69a
3 changed files with 40 additions and 10 deletions
+16 -10
View File
@@ -67,12 +67,6 @@
// Button Base
display: inline-block;
padding: 4px 10px 4px;
// IE7 likes to collapse the whitespace before the button, so bring it back...
*margin-left: 4px;
&:first-child {
// ...but not before the first button
*margin-left: 0;
}
font-size: @baseFontSize;
line-height: @baseLineHeight;
color: @grayDark;
@@ -85,6 +79,8 @@
.box-shadow(@shadow);
cursor: pointer;
.ie7-restore-left-whitespace;
&:hover {
color: @grayDark;
text-decoration: none;
@@ -129,7 +125,7 @@
// Button Sizes
&.large {
padding: 9px 14px 9px;
padding: 9px 14px;
font-size: @baseFontSize + 2px;
line-height: normal;
.border-radius(5px);
@@ -138,7 +134,7 @@
margin-top: 1px;
}
&.small {
padding: 5px 9px 5px;
padding: 5px 9px;
font-size: @baseFontSize - 2px;
line-height: @baseLineHeight - 2px;
}
@@ -150,10 +146,20 @@
// Help Firefox not be a jerk about adding extra padding to buttons
button.btn,
input[type=submit].btn {
// IE7 has some default padding on button controls
*padding: 2px 10px;
&::-moz-focus-inner {
padding: 0;
border: 0;
}
// IE7 has some default padding on button controls
*padding-top: 2px;
*padding-bottom: 2px;
&.large {
*padding-top: 7px;
*padding-bottom: 7px;
}
&.small {
*padding-top: 3px;
*padding-bottom: 3px;
}
}