1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-16 18:44:01 +02:00

Require .form-label classes on form labels (#30476)

This commit is contained in:
Martijn Cuppens
2020-03-31 20:02:57 +02:00
committed by GitHub
parent a0c2a29a8d
commit df707cd727
17 changed files with 82 additions and 73 deletions

View File

@@ -99,7 +99,6 @@
}
.form-check-label {
margin-bottom: 0;
color: $form-check-label-color;
cursor: $form-check-label-cursor;
}

View File

@@ -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;

View File

@@ -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 {