Commit 0220015e authored by Mark Otto's avatar Mark Otto

remove all ie7 conditionals and mixins

parent f0b4f05a
...@@ -8,10 +8,6 @@ ...@@ -8,10 +8,6 @@
* Designed and built with all the love in the world @twitter by @mdo and @fat. * Designed and built with all the love in the world @twitter by @mdo and @fat.
*/ */
.clearfix {
*zoom: 1;
}
.clearfix:before, .clearfix:before,
.clearfix:after { .clearfix:after {
display: table; display: table;
...@@ -100,7 +96,6 @@ ...@@ -100,7 +96,6 @@
.row { .row {
margin-right: -15px; margin-right: -15px;
margin-left: -15px; margin-left: -15px;
*zoom: 1;
} }
.row:before, .row:before,
.row:after { .row:after {
...@@ -372,7 +367,6 @@ ...@@ -372,7 +367,6 @@
.row { .row {
margin-right: -10px; margin-right: -10px;
margin-left: -10px; margin-left: -10px;
*zoom: 1;
} }
.row:before, .row:before,
.row:after { .row:after {
......
This diff is collapsed.
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
// Components: Buttons & Alerts // Components: Buttons & Alerts
@import "buttons.less"; @import "buttons.less";
@import "button-groups.less"; @import "button-groups.less";
@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less @import "alerts.less";
// Components: Nav // Components: Nav
@import "navs.less"; @import "navs.less";
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
.border-radius(4px); .border-radius(4px);
li { li {
display: inline-block; display: inline-block;
.ie7-inline-block();
text-shadow: 0 1px 0 @white; text-shadow: 0 1px 0 @white;
} }
.divider { .divider {
......
...@@ -7,11 +7,9 @@ ...@@ -7,11 +7,9 @@
.btn-group { .btn-group {
position: relative; position: relative;
display: inline-block; display: inline-block;
.ie7-inline-block();
font-size: 0; // remove as part 1 of font-size inline-block hack font-size: 0; // remove as part 1 of font-size inline-block hack
vertical-align: middle; // match .btn alignment given font-size hack above vertical-align: middle; // match .btn alignment given font-size hack above
white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page) white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
.ie7-restore-left-whitespace();
} }
// Space out series of button groups // Space out series of button groups
...@@ -215,8 +213,7 @@ ...@@ -215,8 +213,7 @@
// ---------------------- // ----------------------
.btn-group-vertical { .btn-group-vertical {
display: inline-block; // makes buttons only take up the width they need display: inline-block; // Make buttons only take up the width they need
.ie7-inline-block();
} }
.btn-group-vertical .btn { .btn-group-vertical .btn {
display: block; display: block;
......
...@@ -9,21 +9,17 @@ ...@@ -9,21 +9,17 @@
// Core // Core
.btn { .btn {
display: inline-block; display: inline-block;
.ie7-inline-block();
padding: 4px 12px; padding: 4px 12px;
margin-bottom: 0; // For input.btn margin-bottom: 0; // For input.btn
font-size: @baseFontSize; font-size: @baseFontSize;
line-height: @baseLineHeight; line-height: @baseLineHeight;
*line-height: @baseLineHeight;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
.buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75)); .buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
border: 1px solid @btnBorder; border: 1px solid @btnBorder;
*border: 0; // Remove the border to prevent IE7's black border on input:focus
border-bottom-color: darken(@btnBorder, 10%); border-bottom-color: darken(@btnBorder, 10%);
.border-radius(4px); .border-radius(4px);
.ie7-restore-left-whitespace(); // Give IE7 some love
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
// Hover state // Hover state
...@@ -31,7 +27,6 @@ ...@@ -31,7 +27,6 @@
color: @grayDark; color: @grayDark;
text-decoration: none; text-decoration: none;
background-color: darken(@white, 10%); 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; background-position: 0 -15px;
// transition is only when going to hover, otherwise the background // transition is only when going to hover, otherwise the background
...@@ -183,22 +178,6 @@ input[type="submit"].btn { ...@@ -183,22 +178,6 @@ input[type="submit"].btn {
border: 0; border: 0;
} }
// IE7 has some default padding on button controls
*padding-top: 3px;
*padding-bottom: 3px;
&.btn-large {
*padding-top: 7px;
*padding-bottom: 7px;
}
&.btn-small {
*padding-top: 3px;
*padding-bottom: 3px;
}
&.btn-mini {
*padding-top: 1px;
*padding-bottom: 1px;
}
} }
......
...@@ -33,7 +33,7 @@ pre { ...@@ -33,7 +33,7 @@ pre {
white-space: pre; white-space: pre;
white-space: pre-wrap; white-space: pre-wrap;
background-color: #f5f5f5; background-color: #f5f5f5;
border: 1px solid #ccc; // fallback for IE7-8 border: 1px solid #ccc; // IE8 fallback
border: 1px solid rgba(0,0,0,.15); border: 1px solid rgba(0,0,0,.15);
.border-radius(4px); .border-radius(4px);
......
...@@ -8,10 +8,6 @@ ...@@ -8,10 +8,6 @@
.dropdown { .dropdown {
position: relative; position: relative;
} }
.dropdown-toggle {
// The caret makes the toggle a bit too tall in IE7
*margin-bottom: -3px;
}
.dropdown-toggle:active, .dropdown-toggle:active,
.open .dropdown-toggle { .open .dropdown-toggle {
outline: 0; outline: 0;
...@@ -50,7 +46,7 @@ ...@@ -50,7 +46,7 @@
margin: 2px 0 0; // override default ul margin: 2px 0 0; // override default ul
list-style: none; list-style: none;
background-color: @dropdownBackground; background-color: @dropdownBackground;
border: 1px solid #ccc; // Fallback for IE7-8 border: 1px solid #ccc; // IE8 fallback
border: 1px solid @dropdownBorder; border: 1px solid @dropdownBorder;
*border-right-width: 2px; *border-right-width: 2px;
*border-bottom-width: 2px; *border-bottom-width: 2px;
...@@ -122,10 +118,6 @@ ...@@ -122,10 +118,6 @@
// Open state for the dropdown // Open state for the dropdown
// --------------------------- // ---------------------------
.open { .open {
// IE7's z-index only goes to the nearest positioned ancestor, which would
// make the menu appear below buttons that appeared later on the page
*z-index: @zindexDropdown;
& > .dropdown-menu { & > .dropdown-menu {
display: block; display: block;
} }
......
...@@ -135,7 +135,6 @@ input[type="color"], ...@@ -135,7 +135,6 @@ input[type="color"],
input[type="radio"], input[type="radio"],
input[type="checkbox"] { input[type="checkbox"] {
margin: 4px 0 0; margin: 4px 0 0;
*margin-top: 0; /* IE7 */
margin-top: 1px \9; /* IE8-9 */ margin-top: 1px \9; /* IE8-9 */
line-height: normal; line-height: normal;
cursor: pointer; cursor: pointer;
...@@ -155,8 +154,7 @@ input[type="checkbox"] { ...@@ -155,8 +154,7 @@ input[type="checkbox"] {
// Set the height of select and file controls to match text inputs // Set the height of select and file controls to match text inputs
select, select,
input[type="file"] { input[type="file"] {
height: @inputHeight; /* In IE7, the height of the select element cannot be changed by height, only font-size */ height: @inputHeight; /* In IE7, the height of the select element cannot be changed by height, only font-size. TODO: Check if this is still needed when dropping IE7 support */
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
line-height: @inputHeight; line-height: @inputHeight;
} }
...@@ -403,7 +401,6 @@ select:focus:required:invalid { ...@@ -403,7 +401,6 @@ select:focus:required:invalid {
.help-inline { .help-inline {
display: inline-block; display: inline-block;
.ie7-inline-block();
vertical-align: middle; vertical-align: middle;
padding-left: 5px; padding-left: 5px;
} }
...@@ -539,7 +536,7 @@ input.search-query { ...@@ -539,7 +536,7 @@ input.search-query {
padding-right: 14px; padding-right: 14px;
padding-right: 4px \9; padding-right: 4px \9;
padding-left: 14px; padding-left: 14px;
padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */ padding-left: 4px \9; /* IE8 doesn't have border-radius, so don't indent the padding */
margin-bottom: 0; // Remove the default margin on all inputs margin-bottom: 0; // Remove the default margin on all inputs
.border-radius(15px); .border-radius(15px);
} }
...@@ -582,7 +579,6 @@ input.search-query { ...@@ -582,7 +579,6 @@ input.search-query {
.input-prepend, .input-prepend,
.input-append { .input-append {
display: inline-block; display: inline-block;
.ie7-inline-block();
margin-bottom: 0; margin-bottom: 0;
vertical-align: middle; vertical-align: middle;
} }
...@@ -653,15 +649,7 @@ legend + .control-group { ...@@ -653,15 +649,7 @@ legend + .control-group {
} }
// Move over all input controls and content // Move over all input controls and content
.controls { .controls {
// Super jank IE7 fix to ensure the inputs in .input-append and input-prepend
// don't inherit the margin of the parent, in this case .controls
*display: inline-block;
*padding-left: 20px;
margin-left: @horizontalComponentOffset; margin-left: @horizontalComponentOffset;
*margin-left: 0;
&:first-child {
*padding-left: @horizontalComponentOffset;
}
} }
// Remove bottom margin on block level help text since that's accounted for on .control-group // Remove bottom margin on block level help text since that's accounted for on .control-group
.help-block { .help-block {
......
...@@ -11,10 +11,6 @@ ...@@ -11,10 +11,6 @@
overflow: visible; overflow: visible;
margin-bottom: @baseLineHeight; margin-bottom: @baseLineHeight;
color: @navbarText; color: @navbarText;
// Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
*position: relative;
*z-index: 2;
} }
// Inner for background effects // Inner for background effects
...@@ -450,7 +446,7 @@ ...@@ -450,7 +446,7 @@
.transition(none); .transition(none);
.placeholder(@navbarInverseSearchPlaceholderColor); .placeholder(@navbarInverseSearchPlaceholderColor);
// Focus states (we use .focused since IE7-8 and down doesn't support :focus) // Focus states (we use .focused since IE8 and down doesn't support :focus)
&:focus, &:focus,
&.focused { &.focused {
padding: 5px 15px; padding: 5px 15px;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
.pagination ul { .pagination ul {
// Allow for text-based alignment // Allow for text-based alignment
display: inline-block; display: inline-block;
.ie7-inline-block();
// Reset default ul styles // Reset default ul styles
margin-left: 0; margin-left: 0;
margin-bottom: 0; margin-bottom: 0;
......
...@@ -79,7 +79,7 @@ sub { ...@@ -79,7 +79,7 @@ sub {
img { img {
/* Responsive images (ensure images don't scale beyond their parents) */ /* Responsive images (ensure images don't scale beyond their parents) */
max-width: 100%; /* Part 1: Set a maxium relative to the parent */ max-width: 100%; /* Part 1: Set a maxium relative to the parent */
width: auto\9; /* IE7-8 need help adjusting responsive images */ width: auto\9; /* IE8 need help adjusting responsive images */
height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */ height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */
vertical-align: middle; vertical-align: middle;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
display: inline-block; display: inline-block;
width: 14px; width: 14px;
height: 14px; height: 14px;
.ie7-restore-right-whitespace();
line-height: 14px; line-height: 14px;
vertical-align: text-top; vertical-align: text-top;
background-image: url("@{iconSpritePath}"); background-image: url("@{iconSpritePath}");
......
...@@ -69,7 +69,6 @@ table { ...@@ -69,7 +69,6 @@ table {
.table-bordered { .table-bordered {
border: 1px solid @tableBorder; border: 1px solid @tableBorder;
border-collapse: separate; // Done so we can round those corners! border-collapse: separate; // Done so we can round those corners!
*border-collapse: collapse; // IE7 can't round corners anyway
border-left: 0; border-left: 0;
.border-radius(4px); .border-radius(4px);
th, th,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment