Skip to content

Commit

Permalink
Fixes twbs#11402: Set width: auto; to select.form-control within .for…
Browse files Browse the repository at this point in the history
…m-inline
  • Loading branch information
mdo committed Nov 30, 2013
1 parent d2f8b53 commit 7aa6b41
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions dist/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,9 @@ textarea.input-lg {
.form-inline .form-control {
display: inline-block;
}
.form-inline select.form-control {
width: auto;
}
.form-inline .radio,
.form-inline .checkbox {
display: inline-block;
Expand Down Expand Up @@ -4568,6 +4571,9 @@ textarea.input-group-sm > .input-group-btn > .btn {
.navbar-form .form-control {
display: inline-block;
}
.navbar-form select.form-control {
width: auto;
}
.navbar-form .radio,
.navbar-form .checkbox {
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap.min.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions less/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ input[type="checkbox"],
display: inline-block;
}

// Override `width: 100%;` when not within a `.form-group`
select.form-control {
width: auto;
}

// 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
// a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969).
Expand Down

0 comments on commit 7aa6b41

Please sign in to comment.