From a15c24410be8b94671dcfc3b154e0034a3aaf35f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 9 Mar 2014 21:25:51 -0700 Subject: Fixes #12759 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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` --- less/forms.less | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'less/forms.less') 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%; -- cgit v1.2.3 From b1f71e5292017aca978fabb74d256989e1eeea07 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 9 Mar 2014 21:35:48 -0700 Subject: fix grammar in comment in forms.less --- less/forms.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index b16cf1ae8..de17d1c82 100644 --- a/less/forms.less +++ b/less/forms.less @@ -427,7 +427,7 @@ input[type="checkbox"], // Consistent vertical alignment of radios and checkboxes // - // Labels also get some reset styles, but that is scope to a media query below. + // Labels also get some reset styles, but that is scoped to a media query below. .radio, .checkbox, .radio-inline, -- cgit v1.2.3