mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-26 23:54:23 +01:00
Fix label background color
This commit is contained in:
parent
27cf0cb3ba
commit
842385fd06
@ -59,16 +59,6 @@
|
||||
~ label {
|
||||
color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity});
|
||||
transform: $form-floating-label-transform;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
inset: $form-floating-padding-y ($form-floating-padding-x * .5);
|
||||
z-index: -1;
|
||||
height: $form-floating-label-height;
|
||||
content: "";
|
||||
background-color: $input-bg;
|
||||
@include border-radius($input-border-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
|
||||
@ -78,6 +68,21 @@
|
||||
transform: $form-floating-label-transform;
|
||||
}
|
||||
}
|
||||
> textarea:focus,
|
||||
> textarea:not(:placeholder-shown) {
|
||||
~ label::after {
|
||||
position: absolute;
|
||||
inset: $form-floating-padding-y ($form-floating-padding-x * .5);
|
||||
z-index: -1;
|
||||
height: $form-floating-label-height;
|
||||
content: "";
|
||||
background-color: $input-bg;
|
||||
@include border-radius($input-border-radius);
|
||||
}
|
||||
}
|
||||
> textarea:disabled ~ label::after {
|
||||
background-color: $input-disabled-bg;
|
||||
}
|
||||
|
||||
> .form-control-plaintext {
|
||||
~ label {
|
||||
@ -88,9 +93,5 @@
|
||||
> :disabled ~ label,
|
||||
> .form-control:disabled ~ label { // Required for `.form-control`s because of specificity
|
||||
color: $form-floating-label-disabled-color;
|
||||
|
||||
&::after {
|
||||
background-color: $input-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user