aboutsummaryrefslogtreecommitdiff
path: root/less/input-groups.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-18 10:22:18 -0800
committerMark Otto <[email protected]>2013-12-18 10:22:18 -0800
commit1bc8607bdffe641d58191084b214138a98aba229 (patch)
treeffb2855b592ee37c5068da181a4c3fb335a322da /less/input-groups.less
parent9e38e255343a4fd5fa2fa932c96be9cb5c902337 (diff)
parentd15218a09ce68d0854d0aa5f5170c1ea859aee31 (diff)
downloadbootstrap-1bc8607bdffe641d58191084b214138a98aba229.tar.xz
bootstrap-1bc8607bdffe641d58191084b214138a98aba229.zip
Merge branch 'master' into css-source-maps
Conflicts: Gruntfile.js
Diffstat (limited to 'less/input-groups.less')
-rw-r--r--less/input-groups.less57
1 files changed, 39 insertions, 18 deletions
diff --git a/less/input-groups.less b/less/input-groups.less
index d19c4c64a..b486cf4d2 100644
--- a/less/input-groups.less
+++ b/less/input-groups.less
@@ -17,6 +17,11 @@
}
.form-control {
+ // IE9 fubars the placeholder attribute in text inputs and the arrows on
+ // select elements in input groups. To fix it, we float the input. Details:
+ // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
+ float: left;
+
width: 100%;
margin-bottom: 0;
}
@@ -90,8 +95,10 @@
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
-.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
.border-right-radius(0);
}
.input-group-addon:first-child {
@@ -100,8 +107,10 @@
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
-.input-group-btn:first-child > .btn:not(:first-child) {
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
.border-left-radius(0);
}
.input-group-addon:last-child {
@@ -112,25 +121,37 @@
// -------------------------
.input-group-btn {
position: relative;
+ // Jankily prevent input button groups from wrapping with `white-space` and
+ // `font-size` in combination with `inline-block` on buttons.
+ font-size: 0;
white-space: nowrap;
- // Negative margin to only have a 1px border between the two
- &:first-child > .btn {
- margin-right: -1px;
+ // Negative margin for spacing, position for bringing hovered/focused/actived
+ // element above the siblings.
+ > .btn {
+ position: relative;
+ + .btn {
+ margin-left: -1px;
+ }
+ // Bring the "active" button to the front
+ &:hover,
+ &:focus,
+ &:active {
+ z-index: 2;
+ }
}
- &:last-child > .btn {
- margin-left: -1px;
- }
-}
-.input-group-btn > .btn {
- position: relative;
- // Jankily prevent input button groups from wrapping
- + .btn {
- margin-left: -4px;
+
+ // Negative margin to only have a 1px border between the two
+ &:first-child {
+ > .btn,
+ > .btn-group {
+ margin-right: -1px;
+ }
}
- // Bring the "active" button to the front
- &:hover,
- &:active {
- z-index: 2;
+ &:last-child {
+ > .btn,
+ > .btn-group {
+ margin-left: -1px;
+ }
}
}