From be4e951b7dc254dac08a5d2c6b88be0cda6e420f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 13 Oct 2013 20:02:24 -0700 Subject: scope top padding of .form-control-static to be within horizontal forms only; fixes #10927 --- less/forms.less | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index cb9d30a37..f6bbce596 100644 --- a/less/forms.less +++ b/less/forms.less @@ -267,7 +267,6 @@ input[type="checkbox"], .form-control-static { margin-bottom: 0; // Remove default margin from `p` - padding-top: (@padding-base-vertical + 1); } @@ -354,6 +353,10 @@ input[type="checkbox"], .make-row(); } + .form-control-static { + padding-top: (@padding-base-vertical + 1); + } + // Only right align form labels here when the columns stop stacking @media (min-width: @screen-sm-min) { .control-label { -- cgit v1.2.3 From f1bc840d4368a79f0f0872000c3fdf6356af2a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Sat, 2 Nov 2013 09:35:51 +0100 Subject: Use nesting for .placeholder() --- less/forms.less | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index f6bbce596..a74babdb3 100644 --- a/less/forms.less +++ b/less/forms.less @@ -92,14 +92,6 @@ output { vertical-align: middle; } -// Placeholder -// -// Placeholder text gets special styles because when browsers invalidate entire -// lines if it doesn't understand a selector/ -.form-control { - .placeholder(); -} - // Common form controls // @@ -142,6 +134,12 @@ output { // Customize the `:focus` state to imitate native WebKit styles. .form-control-focus(); + // Placeholder + // + // Placeholder text gets special styles because when browsers invalidate entire + // lines if it doesn't understand a selector/ + .placeholder(); + // Disabled and read-only inputs // Note: HTML5 says that controls under a fieldset > legend:first-child won't // be disabled if the fieldset is disabled. Due to implementation difficulty, -- cgit v1.2.3 From 7aa6b4190be5316756fa179bb192258ce3b47548 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 30 Nov 2013 15:57:25 -0800 Subject: Fixes #11402: Set width: auto; to select.form-control within .form-inline --- 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 a74babdb3..af1f5ac9e 100644 --- a/less/forms.less +++ b/less/forms.less @@ -309,6 +309,11 @@ input[type="checkbox"], display: inline-block; } + // Override `width: 100%;` when not within a `.form-group` + select.form-control { + width: auto; + } + // Remove default margin on radios/checkboxes that were used for stacking, and // then undo the floating of radios and checkboxes to match (which also avoids // a bug in WebKit: https://github.com/twbs/bootstrap/issues/1969). -- cgit v1.2.3 From 48269dcd282f05be79c9bb8cba032c745b3b337a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 30 Nov 2013 23:17:43 -0800 Subject: Fixes #11658: Increase min-height of .radio and .checkbox for horizontal forms to ensure alignment of content below --- 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 af1f5ac9e..dc425ecc1 100644 --- a/less/forms.less +++ b/less/forms.less @@ -350,6 +350,12 @@ input[type="checkbox"], margin-bottom: 0; padding-top: (@padding-base-vertical + 1); // Default padding plus a border } + // Account for padding we're adding to ensure the alignment and of help text + // and other content below items + .radio, + .checkbox { + min-height: @line-height-computed + (@padding-base-vertical + 1); + } // Make form groups behave like rows .form-group { -- cgit v1.2.3 From f4087df47e6347a2f28b44a18914cfebf1cc3a9c Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 6 Dec 2013 12:42:21 +0200 Subject: Remove incompatible properties. --- less/forms.less | 4 ---- 1 file changed, 4 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index dc425ecc1..81840d158 100644 --- a/less/forms.less +++ b/less/forms.less @@ -89,7 +89,6 @@ output { font-size: @font-size-base; line-height: @line-height-base; color: @input-color; - vertical-align: middle; } @@ -123,7 +122,6 @@ output { font-size: @font-size-base; line-height: @line-height-base; color: @input-color; - vertical-align: middle; background-color: @input-bg; background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 border: 1px solid @input-border; @@ -179,10 +177,8 @@ output { margin-top: 10px; margin-bottom: 10px; padding-left: 20px; - vertical-align: middle; label { display: inline; - margin-bottom: 0; font-weight: normal; cursor: pointer; } -- cgit v1.2.3 From b5008ebf9ca1c9c90a6ec73ae12e55a8f155017f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 8 Dec 2013 01:59:44 -0800 Subject: add vertical-align back to where it's necessary since we reset from block to inline-block on several inputs --- less/forms.less | 2 ++ 1 file changed, 2 insertions(+) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index 81840d158..50df399e3 100644 --- a/less/forms.less +++ b/less/forms.less @@ -303,6 +303,7 @@ input[type="checkbox"], // In navbar-form, allow folks to *not* use `.form-group` .form-control { display: inline-block; + vertical-align: middle; } // Override `width: 100%;` when not within a `.form-group` @@ -319,6 +320,7 @@ input[type="checkbox"], margin-top: 0; margin-bottom: 0; padding-left: 0; + vertical-align: middle; } .radio input[type="radio"], .checkbox input[type="checkbox"] { -- cgit v1.2.3 From ab29b1a3352e89fe8756a34e49a38341edd06844 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 9 Dec 2013 16:12:41 -0800 Subject: misc strictMath compliance fixes --- 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 50df399e3..f7fc5d66c 100644 --- a/less/forms.less +++ b/less/forms.less @@ -352,7 +352,7 @@ input[type="checkbox"], // and other content below items .radio, .checkbox { - min-height: @line-height-computed + (@padding-base-vertical + 1); + min-height: (@line-height-computed + (@padding-base-vertical + 1)); } // Make form groups behave like rows -- cgit v1.2.3