aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-09-20 11:45:59 -0700
committerMark Otto <[email protected]>2012-09-20 11:45:59 -0700
commitc92a75999f8b82c1a6fc997eca1cc0206c4c3bf1 (patch)
tree5a4700d50b9eb242f255598ded97667f2454ca15
parent532ee082135eec9ba510d8f085add8722da5a03b (diff)
downloadbootstrap-c92a75999f8b82c1a6fc997eca1cc0206c4c3bf1.tar.xz
bootstrap-c92a75999f8b82c1a6fc997eca1cc0206c4c3bf1.zip
fixes #5127: add @inputHeight to replace static instances of '30px' throughout forms
-rw-r--r--docs/assets/css/bootstrap.css6
-rw-r--r--less/forms.less10
-rw-r--r--less/mixins.less2
-rw-r--r--less/variables.less1
4 files changed, 10 insertions, 9 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css
index 4ce730e7b..0973e4e32 100644
--- a/docs/assets/css/bootstrap.css
+++ b/docs/assets/css/bootstrap.css
@@ -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,
diff --git a/less/forms.less b/less/forms.less
index 249e9ef84..c155fc004 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -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
@@ -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
diff --git a/less/mixins.less b/less/mixins.less
index 7dd6670e2..1466696bc 100644
--- a/less/mixins.less
+++ b/less/mixins.less
@@ -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
}
diff --git a/less/variables.less b/less/variables.less
index fcb85c009..7ca1305fe 100644
--- a/less/variables.less
+++ b/less/variables.less
@@ -114,6 +114,7 @@
@inputBorderRadius: @baseBorderRadius;
@inputDisabledBackground: @grayLighter;
@formActionsBackground: #f5f5f5;
+@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
// Dropdowns