mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-21 04:41:36 +02:00
Require .form-label
classes on form labels (#30476)
This commit is contained in:
@@ -149,8 +149,6 @@
|
||||
.btn-group-toggle {
|
||||
> .btn,
|
||||
> .btn-group > .btn {
|
||||
margin-bottom: 0; // Override default `<label>` value
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
|
@@ -46,7 +46,6 @@
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
||||
margin-bottom: 0; // for <label> variations
|
||||
color: $list-group-color;
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
background-color: $list-group-bg;
|
||||
|
@@ -381,7 +381,6 @@ th {
|
||||
|
||||
label {
|
||||
display: inline-block; // 1
|
||||
margin-bottom: $label-margin-bottom;
|
||||
}
|
||||
|
||||
// Remove the default `border-radius` that macOS Chrome adds.
|
||||
|
@@ -557,7 +557,11 @@ $btn-transition: color .15s ease-in-out, background-color .15s ease
|
||||
|
||||
// Forms
|
||||
|
||||
$label-margin-bottom: .5rem !default;
|
||||
$form-label-margin-bottom: .5rem !default;
|
||||
$form-label-font-size: null !default;
|
||||
$form-label-font-style: null !default;
|
||||
$form-label-font-weight: null !default;
|
||||
$form-label-color: null !default;
|
||||
|
||||
$input-padding-y: $input-btn-padding-y !default;
|
||||
$input-padding-x: $input-btn-padding-x !default;
|
||||
|
@@ -99,7 +99,6 @@
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
margin-bottom: 0;
|
||||
color: $form-check-label-color;
|
||||
cursor: $form-check-label-cursor;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user