aboutsummaryrefslogtreecommitdiff
path: root/less/forms.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-08-18 19:02:42 -0700
committerMark Otto <[email protected]>2013-08-18 19:02:42 -0700
commit9dcae610e97c5422652d7212fda5985de1653d4c (patch)
tree03f5f15fb5d3a1561f69ce97a1a9f651e816330c /less/forms.less
parent578a14e14aa7c6ad37f307d5d78e9a2afb0e7bfb (diff)
parent5bd2d7ed7e5a2bae56de81bf550f2e4b1451ab25 (diff)
downloadbootstrap-9dcae610e97c5422652d7212fda5985de1653d4c.tar.xz
bootstrap-9dcae610e97c5422652d7212fda5985de1653d4c.zip
Merge branch '3.0.0-wip' into bs3_homepage
Conflicts: customize.html examples/justified-nav/justified-nav.css
Diffstat (limited to 'less/forms.less')
-rw-r--r--less/forms.less29
1 files changed, 18 insertions, 11 deletions
diff --git a/less/forms.less b/less/forms.less
index c59cdd4d7..0118e242c 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -326,21 +326,28 @@ input[type="checkbox"],
// Horizontal forms are built on grid classes and allow you to create forms with
// labels on the left and inputs on the right.
-.form-horizontal .control-label,
-.form-horizontal .radio-inline,
-.form-horizontal .checkbox-inline {
- padding-top: @padding-base-vertical;
-}
-
.form-horizontal {
+
+ // Consistent vertical alignment of labels, radios, and checkboxes
+ .control-label,
+ .radio,
+ .checkbox,
+ .radio-inline,
+ .checkbox-inline {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: (@padding-base-vertical + 1); // Default padding plus a border
+ }
+
+ // Make form groups behave like rows
.form-group {
.make-row();
}
-}
-// Only right align form labels here when the columns stop stacking
-@media (min-width: @screen-tablet) {
- .form-horizontal .control-label {
- text-align: right;
+ // Only right align form labels here when the columns stop stacking
+ @media (min-width: @screen-tablet) {
+ .control-label {
+ text-align: right;
+ }
}
}