aboutsummaryrefslogtreecommitdiff
path: root/less/input-groups.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-16 00:39:50 -0800
committerMark Otto <[email protected]>2013-12-16 00:39:50 -0800
commitb6b2c90a7d6c00b54d844e52956334e4a0ab56cc (patch)
tree4b93730621a833d93ac161d9507acae647afedb0 /less/input-groups.less
parent0cb570724dbfb266b363d0e5e27385077976dd65 (diff)
parentec261a83a565cfa13d436feebd7a67360a920e9a (diff)
downloadbootstrap-b6b2c90a7d6c00b54d844e52956334e4a0ab56cc.tar.xz
bootstrap-b6b2c90a7d6c00b54d844e52956334e4a0ab56cc.zip
Merge branch 'master' into docs_derp
Diffstat (limited to 'less/input-groups.less')
-rw-r--r--less/input-groups.less35
1 files changed, 23 insertions, 12 deletions
diff --git a/less/input-groups.less b/less/input-groups.less
index d19c4c64a..de1e68903 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;
}
@@ -112,8 +117,26 @@
// -------------------------
.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 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;
+ }
+ }
+
// Negative margin to only have a 1px border between the two
&:first-child > .btn {
margin-right: -1px;
@@ -122,15 +145,3 @@
margin-left: -1px;
}
}
-.input-group-btn > .btn {
- position: relative;
- // Jankily prevent input button groups from wrapping
- + .btn {
- margin-left: -4px;
- }
- // Bring the "active" button to the front
- &:hover,
- &:active {
- z-index: 2;
- }
-}