Skip to content

Commit

Permalink
fixes #5127: add @inputHeight to replace static instances of '30px' t…
Browse files Browse the repository at this point in the history
…hroughout forms
  • Loading branch information
mdo committed Sep 20, 2012
1 parent 532ee08 commit c92a759
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/assets/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -1148,14 +1148,14 @@ textarea::-webkit-input-placeholder {

.radio,
.checkbox {
min-height: 18px;
padding-left: 18px;
min-height: 20px;
padding-left: 20px;
}

.radio input[type="radio"],
.checkbox input[type="checkbox"] {
float: left;
margin-left: -18px;
margin-left: -20px;
}

.controls > .radio:first-child,
Expand Down
10 changes: 5 additions & 5 deletions less/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ input[type="checkbox"] {
// Set the height of select and file controls to match text inputs
select,
input[type="file"] {
height: 30px; /* In IE7, the height of the select element cannot be changed by height, only font-size */
height: @inputHeight; /* In IE7, the height of the select element cannot be changed by height, only font-size */
*margin-top: 4px; /* For IE7, add top margin to align select with labels */
line-height: 30px;
line-height: @inputHeight;
}

// Make select elements obey height by applying a border
Expand Down Expand Up @@ -223,13 +223,13 @@ textarea {
// Indent the labels to position radios/checkboxes as hanging
.radio,
.checkbox {
min-height: 18px; // clear the floating input if there is no label text
padding-left: 18px;
min-height: @baseLineHeight; // clear the floating input if there is no label text
padding-left: 20px;
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
float: left;
margin-left: -18px;
margin-left: -20px;
}

// Move the options list down to align with labels
Expand Down
2 changes: 1 addition & 1 deletion less/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
.input-block-level {
display: block;
width: 100%;
min-height: 30px; // Make inputs at least the height of their button counterpart
min-height: @inputHeight; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
.box-sizing(border-box); // Makes inputs behave like true block-level elements
}

Expand Down
1 change: 1 addition & 0 deletions less/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
@inputBorderRadius: @baseBorderRadius;
@inputDisabledBackground: @grayLighter;
@formActionsBackground: #f5f5f5;
@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border


// Dropdowns
Expand Down

0 comments on commit c92a759

Please sign in to comment.