diff options
| author | Mark Otto <[email protected]> | 2013-12-14 15:38:21 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-12-14 15:38:21 -0800 |
| commit | a54dbfdf2a08ff04fc65f8e4f77ee5dc76bf4ef3 (patch) | |
| tree | 9b1c5697a731543a86711b016e1986ec1e81dad4 /less/forms.less | |
| parent | 80e86442308b2cc86ba948de87e854057933e3ab (diff) | |
| parent | f1869771bc8b8e8a6c7a98385ec58e0bf0d2d98e (diff) | |
| download | bootstrap-a54dbfdf2a08ff04fc65f8e4f77ee5dc76bf4ef3.tar.xz bootstrap-a54dbfdf2a08ff04fc65f8e4f77ee5dc76bf4ef3.zip | |
Merge branch 'master' into pr/10951
Conflicts:
dist/css/bootstrap.min.css
less/modals.less
Diffstat (limited to 'less/forms.less')
| -rw-r--r-- | less/forms.less | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/less/forms.less b/less/forms.less index cb9d30a37..f7fc5d66c 100644 --- a/less/forms.less +++ b/less/forms.less @@ -89,15 +89,6 @@ output { font-size: @font-size-base; line-height: @line-height-base; color: @input-color; - 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(); } @@ -131,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; @@ -142,6 +132,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, @@ -181,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; } @@ -267,7 +261,6 @@ input[type="checkbox"], .form-control-static { margin-bottom: 0; // Remove default margin from `p` - padding-top: (@padding-base-vertical + 1); } @@ -310,6 +303,12 @@ 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` + select.form-control { + width: auto; } // Remove default margin on radios/checkboxes that were used for stacking, and @@ -321,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"] { @@ -348,12 +348,22 @@ 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 { .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 { |
