fix navbar form alignment of inputs by restoring inline-block

This commit is contained in:
Mark Otto 2013-08-12 16:09:21 -07:00
parent c558c035d7
commit eac61de138
3 changed files with 14 additions and 1 deletions

View File

@ -1820,6 +1820,9 @@ textarea.input-sm {
margin-bottom: 0; margin-bottom: 0;
vertical-align: middle; vertical-align: middle;
} }
.form-inline .form-control {
display: inline-block;
}
.form-inline .radio, .form-inline .radio,
.form-inline .checkbox { .form-inline .checkbox {
display: inline-block; display: inline-block;
@ -3164,6 +3167,9 @@ button.close {
margin-bottom: 0; margin-bottom: 0;
vertical-align: middle; vertical-align: middle;
} }
.navbar-form .form-control {
display: inline-block;
}
.navbar-form .radio, .navbar-form .radio,
.navbar-form .checkbox { .navbar-form .checkbox {
display: inline-block; display: inline-block;

File diff suppressed because one or more lines are too long

View File

@ -299,6 +299,8 @@ textarea {
// //
// Requires wrapping inputs and labels with `.form-group` for proper display of // Requires wrapping inputs and labels with `.form-group` for proper display of
// default HTML form controls and our custom form controls (e.g., input groups). // default HTML form controls and our custom form controls (e.g., input groups).
//
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
.form-inline { .form-inline {
@ -311,6 +313,11 @@ textarea {
vertical-align: middle; vertical-align: middle;
} }
// In navbar-form, allow folks to *not* use `.form-group`
.form-control {
display: inline-block;
}
// Remove default margin on radios/checkboxes that were used for stacking, and // Remove default margin on radios/checkboxes that were used for stacking, and
// then undo the floating of radios and checkboxes to match (which also avoids // then undo the floating of radios and checkboxes to match (which also avoids
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).