From 9b61b7a72219888ff662186dbe552150497715f9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 18 Aug 2013 15:10:28 -0700 Subject: fixes #9803: label and input alignment in horizontal forms --- less/forms.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index c59cdd4d7..798b07c17 100644 --- a/less/forms.less +++ b/less/forms.less @@ -329,7 +329,7 @@ input[type="checkbox"], .form-horizontal .control-label, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline { - padding-top: @padding-base-vertical; + padding-top: (@padding-base-vertical + 1); // Default padding plus a border } .form-horizontal { -- cgit v1.2.3 From fe767a18d369080df509377e049b616c0c572dcc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 18 Aug 2013 15:41:24 -0700 Subject: fixes #9798: update spacing on checkboxes and radios for horizontal --- less/forms.less | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index 798b07c17..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 + 1); // Default padding plus a border -} - .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; + } } } -- cgit v1.2.3