]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fixes #5127: add @inputHeight to replace static instances of '30px' throughout forms
authorMark Otto <markotto@twitter.com>
Thu, 20 Sep 2012 18:45:59 +0000 (11:45 -0700)
committerMark Otto <markotto@twitter.com>
Thu, 20 Sep 2012 18:45:59 +0000 (11:45 -0700)
docs/assets/css/bootstrap.css
less/forms.less
less/mixins.less
less/variables.less

index 4ce730e7b0c254f6e0b1efa4d70394a53e114988..0973e4e323580d3163175e9585852ded877a14d8 100644 (file)
@@ -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,
index 249e9ef84c79360bea5a7264da7d174100ee5eca..c155fc0041f3260b733966c0a24a8d0ed23c2b62 100644 (file)
@@ -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
index 7dd6670e22c3b052af3af6d036730b28b0205611..1466696bc23992f660d23195dd8f8aeb8480cee2 100644 (file)
 .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
 }
 
index fcb85c0095c5f28c10b59000bcc5f2fe90e8eba9..7ca1305fe89c343965935db7652708aed9fd9ea9 100644 (file)
 @inputBorderRadius:             @baseBorderRadius;
 @inputDisabledBackground:       @grayLighter;
 @formActionsBackground:         #f5f5f5;
+@inputHeight:                   @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
 
 
 // Dropdowns