diff options
| author | Martijn Cuppens <[email protected]> | 2020-03-31 20:02:57 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-03-31 20:02:57 +0200 |
| commit | df707cd7272f9165dda895f08bdd15d093d96a25 (patch) | |
| tree | 81c2effffc72b50164668054f2f0db7931bb02ab /scss/forms | |
| parent | a0c2a29a8dbb563fb84591522c6412063df70d59 (diff) | |
| download | bootstrap-df707cd7272f9165dda895f08bdd15d093d96a25.tar.xz bootstrap-df707cd7272f9165dda895f08bdd15d093d96a25.zip | |
Require `.form-label` classes on form labels (#30476)
Diffstat (limited to 'scss/forms')
| -rw-r--r-- | scss/forms/_form-check.scss | 1 | ||||
| -rw-r--r-- | scss/forms/_input-group.scss | 1 | ||||
| -rw-r--r-- | scss/forms/_labels.scss | 13 |
3 files changed, 12 insertions, 3 deletions
diff --git a/scss/forms/_form-check.scss b/scss/forms/_form-check.scss index 03ae57385..3666b6ab4 100644 --- a/scss/forms/_form-check.scss +++ b/scss/forms/_form-check.scss @@ -99,7 +99,6 @@ } .form-check-label { - margin-bottom: 0; color: $form-check-label-color; cursor: $form-check-label-cursor; } diff --git a/scss/forms/_input-group.scss b/scss/forms/_input-group.scss index 878cb83d6..c8e86cebe 100644 --- a/scss/forms/_input-group.scss +++ b/scss/forms/_input-group.scss @@ -63,7 +63,6 @@ display: flex; align-items: center; padding: $input-padding-y $input-padding-x; - margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom @include font-size($input-font-size); // Match inputs font-weight: $font-weight-normal; line-height: $input-line-height; diff --git a/scss/forms/_labels.scss b/scss/forms/_labels.scss index a3184b7d7..39ecafcd2 100644 --- a/scss/forms/_labels.scss +++ b/scss/forms/_labels.scss @@ -2,14 +2,25 @@ // Labels // +.form-label { + margin-bottom: $form-label-margin-bottom; + @include font-size($form-label-font-size); + font-style: $form-label-font-style; + font-weight: $form-label-font-weight; + color: $form-label-color; +} + // For use with horizontal and inline forms, when you need the label (or legend) // text to align with the form controls. .col-form-label { padding-top: add($input-padding-y, $input-border-width); padding-bottom: add($input-padding-y, $input-border-width); - margin-bottom: 0; // Override the `<label>/<legend>` default + margin-bottom: 0; // Override the `<legend>` default @include font-size(inherit); // Override the `<legend>` default + font-style: $form-label-font-style; + font-weight: $form-label-font-weight; line-height: $input-line-height; + color: $form-label-color; } .col-form-label-lg { |
