From 920d9958431b3d0a08401bfbc097416bc83211bd Mon Sep 17 00:00:00 2001 From: Jeremy Martin Date: Thu, 9 Feb 2012 15:27:42 -0500 Subject: webkit legend margin fix for non-horizontal forms --- less/forms.less | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index 5bce4cebd..5fbb53c9a 100644 --- a/less/forms.less +++ b/less/forms.less @@ -459,15 +459,16 @@ select:focus:required:invalid { margin-bottom: @baseLineHeight / 2; } +// Legend collapses margin, so next element is responsible for spacing +legend + .control-group { + margin-top: @baseLineHeight; + -webkit-margin-top-collapse: separate; +} + // Horizontal-specific styles // -------------------------- .form-horizontal { - // Legend collapses margin, so we're relegated to padding - legend + .control-group { - margin-top: @baseLineHeight; - -webkit-margin-top-collapse: separate; - } // Increase spacing between groups .control-group { margin-bottom: @baseLineHeight; -- cgit v1.2.3 From 8f1db4321a35851d5b726290b2d99e7ea1ec7239 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 11 Feb 2012 00:24:06 -0800 Subject: fix inline form checkbox/radios --- less/forms.less | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index 5fbb53c9a..17393b280 100644 --- a/less/forms.less +++ b/less/forms.less @@ -453,6 +453,14 @@ select:focus:required:invalid { .form-inline .input-prepend .add-on { vertical-align: middle; } +// Inline checkbox/radio labels +.form-search .radio, +.form-inline .radio, +.form-search .checkbox, +.form-inline .checkbox { + margin-bottom: 0; + vertical-align: middle; +} // Margin to space out fieldsets .control-group { -- cgit v1.2.3 From 5a3dfb72bfcf1859690c76a8ddb8457eb962bdb3 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 11 Feb 2012 16:50:57 -0800 Subject: support small for legend per #1544 --- less/forms.less | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index 17393b280..f262af0db 100644 --- a/less/forms.less +++ b/less/forms.less @@ -28,6 +28,12 @@ legend { color: @grayDark; border: 0; border-bottom: 1px solid #eee; + + // Small + small { + font-size: @baseLineHeight * .75; + color: @grayLight; + } } // Set font for forms -- cgit v1.2.3 From 158419c0455ea499197f8b7917bdfe299caaac19 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 11 Feb 2012 20:00:44 -0800 Subject: reset line-height for file input in ie9 --- less/forms.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index f262af0db..7f076aca3 100644 --- a/less/forms.less +++ b/less/forms.less @@ -122,6 +122,11 @@ input[type="file"] { line-height: 28px; } +// Reset line-height for IE +input[type="file"] { + line-height: 18px \9; +} + // Chrome on Linux and Mobile Safari need background-color select { width: 220px; // default input width + 10px of padding that doesn't get applied -- cgit v1.2.3 From b327420e524691808b59fa2d0d552e5ec65e2a45 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 11 Feb 2012 20:58:10 -0800 Subject: update comment to reflect ie support --- 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 7f076aca3..81833b064 100644 --- a/less/forms.less +++ b/less/forms.less @@ -207,7 +207,7 @@ textarea:focus { @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); .box-shadow(@shadow); outline: 0; - outline: thin dotted \9; /* IE6-8 */ + outline: thin dotted \9; /* IE6-9 */ } input[type="file"]:focus, input[type="radio"]:focus, -- cgit v1.2.3