]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fixes #4729: only use margin-top on .help-block when it follows an input, select...
authorMark Otto <markotto@twitter.com>
Tue, 28 Aug 2012 05:42:12 +0000 (22:42 -0700)
committerMark Otto <markotto@twitter.com>
Tue, 28 Aug 2012 05:42:12 +0000 (22:42 -0700)
docs/assets/css/bootstrap.css
less/forms.less

index 96d5500d6d74971adbe6a07eeee7fa8691126d5e..0cef969da0cf6e3303fb3451cfb077565359f916 100644 (file)
@@ -1792,10 +1792,15 @@ legend + .control-group {
 }
 
 .form-horizontal .help-block {
-  margin-top: 10px;
   margin-bottom: 0;
 }
 
+.form-horizontal input + .help-block,
+.form-horizontal select + .help-block,
+.form-horizontal textarea + .help-block {
+  margin-top: 10px;
+}
+
 .form-horizontal .form-actions {
   padding-left: 160px;
 }
index d2445b987f715a3f076776f594fa2e795eb026b1..2864bff0db8df953d9babf9772f71b14f4110ced 100644 (file)
@@ -633,9 +633,16 @@ legend + .control-group {
   }
   // Remove bottom margin on block level help text since that's accounted for on .control-group
   .help-block {
-    margin-top: @baseLineHeight / 2;
     margin-bottom: 0;
   }
+  // And apply it only to .help-block instances that follow a form control
+  input,
+  select,
+  textarea {
+    + .help-block {
+      margin-top: @baseLineHeight / 2;
+    }
+  }
   // Move over buttons in .form-actions to align with .controls
   .form-actions {
     padding-left: 160px;