aboutsummaryrefslogtreecommitdiff
path: root/less/forms.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-03-09 21:25:51 -0700
committerMark Otto <[email protected]>2014-03-09 21:25:51 -0700
commita15c24410be8b94671dcfc3b154e0034a3aaf35f (patch)
tree5c150ed0bef9204736fce436b922ceb437130a1a /less/forms.less
parentb4d66b7f6b8ca49fbf45fccf445910d607969946 (diff)
downloadbootstrap-a15c24410be8b94671dcfc3b154e0034a3aaf35f.tar.xz
bootstrap-a15c24410be8b94671dcfc3b154e0034a3aaf35f.zip
Fixes #12759
Ensures proper sizing and alignment of input groups within inline and navbar forms. * Uses `inline-table` on the input group * Nukes the widths to `width: auto`—without this, the parent input group doesn’t size correctly and functions as `display: table;` or `block`
Diffstat (limited to 'less/forms.less')
-rw-r--r--less/forms.less12
1 files changed, 12 insertions, 0 deletions
diff --git a/less/forms.less b/less/forms.less
index 47ed3426a..b16cf1ae8 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -368,6 +368,18 @@ input[type="checkbox"],
width: auto; // Prevent labels from stacking above inputs in `.form-group`
vertical-align: middle;
}
+
+ .input-group {
+ display: inline-table;
+ vertical-align: middle;
+
+ .input-group-addon,
+ .input-group-btn,
+ .form-control {
+ width: auto;
+ }
+ }
+
// Input groups need that 100% width though
.input-group > .form-control {
width: 100%;