From 83f1a75e7a8ae4570641f1fcf88c2062373fff62 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 11 Aug 2013 18:06:26 -0700 Subject: addressing #9189 manually, part 3: forms --- less/forms.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index d0211eb14..97527fdbf 100644 --- a/less/forms.less +++ b/less/forms.less @@ -20,7 +20,7 @@ legend { margin-bottom: @line-height-computed; font-size: (@font-size-base * 1.5); line-height: inherit; - color: @gray-dark; + color: @legend-color; border: 0; border-bottom: 1px solid @legend-border-color; } @@ -121,7 +121,7 @@ input[type="number"] { padding: @padding-base-vertical @padding-base-horizontal; font-size: @font-size-base; line-height: @line-height-base; - color: @gray; + color: @input-color; vertical-align: middle; background-color: @input-bg; border: 1px solid @input-border; -- cgit v1.2.3 From f662dff6e9c52770511e5f674579a27eeac85549 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 12 Aug 2013 11:07:23 -0700 Subject: fixes #9382: inline forms now require use of .form-group for proper alignment of all form controls --- less/forms.less | 54 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 19 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index 97527fdbf..735db0495 100644 --- a/less/forms.less +++ b/less/forms.less @@ -293,28 +293,44 @@ textarea { // Inline forms // -// Make forms appear inline(-block). +// Make forms appear inline(-block) by adding the `.form-inline` class. Inline +// forms begin stacked on extra small (mobile) devices and then go inline when +// viewports reach <768px. +// +// Requires wrapping inputs and labels with `.form-group` for proper display of +// default HTML form controls and our custom form controls (e.g., input groups). .form-inline { - .form-control, - .radio, - .checkbox { - display: inline-block; - } - // 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). - .radio, - .checkbox { - margin-top: 0; - margin-bottom: 0; - padding-left: 0; - } - .radio input[type="radio"], - .checkbox input[type="checkbox"] { - float: none; - margin-left: 0; + // Kick in the inline + @media (min-width: @screen-tablet) { + // Inline-block all the things for "inline" + .form-group { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + } + + // Reset form control's default 100% width + .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). + .radio, + .checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + padding-left: 0; + } + .radio input[type="radio"], + .checkbox input[type="checkbox"] { + float: none; + margin-left: 0; + } } } -- cgit v1.2.3 From eb1565681fc526c7f75b90ae3dae1d82b47eb4b6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 12 Aug 2013 14:52:49 -0700 Subject: fixes #9392: no need for width auto on inline/navbar form controls given inline-block on parent form group --- less/forms.less | 5 ----- 1 file changed, 5 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index 735db0495..d78784897 100644 --- a/less/forms.less +++ b/less/forms.less @@ -311,11 +311,6 @@ textarea { vertical-align: middle; } - // Reset form control's default 100% width - .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 eac61de138278aa1c0d70dfed7a9515c714b6ad9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 12 Aug 2013 16:09:21 -0700 Subject: fix navbar form alignment of inputs by restoring inline-block --- less/forms.less | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index d78784897..af575db22 100644 --- a/less/forms.less +++ b/less/forms.less @@ -299,6 +299,8 @@ textarea { // // Requires wrapping inputs and labels with `.form-group` for proper display of // default HTML form controls and our custom form controls (e.g., input groups). +// +// Heads up! This is mixin-ed into `.navbar-form` in navbars.less. .form-inline { @@ -311,6 +313,11 @@ textarea { vertical-align: middle; } + // In navbar-form, allow folks to *not* use `.form-group` + .form-control { + display: inline-block; + } + // 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 6ec0fd7d43d1ab243a8796b7544a4634ef086117 Mon Sep 17 00:00:00 2001 From: ggam Date: Tue, 13 Aug 2013 19:06:02 +0200 Subject: Added input-size mixin --- less/forms.less | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'less/forms.less') diff --git a/less/forms.less b/less/forms.less index af575db22..18d3efb54 100644 --- a/less/forms.less +++ b/less/forms.less @@ -208,43 +208,13 @@ input[type="number"] { } - // Form control sizing -// -// Relative text size, padding, and border-radii changes for form controls. For -// horizontal sizing, wrap controls in the predefined grid classes. `