Fix input group z-index focus + validation

This commit is contained in:
Florian Lacreuse 2022-08-31 16:17:58 +02:00 committed by Mark Otto
parent ebbed79df7
commit 2f3aec819a
2 changed files with 12 additions and 12 deletions

View File

@ -22,7 +22,7 @@
> .form-control:focus,
> .form-select:focus,
> .form-floating:focus-within {
z-index: 3;
z-index: 5;
}
// Ensure buttons are always above inputs for more visually pleasing borders.
@ -33,7 +33,7 @@
z-index: 2;
&:focus {
z-index: 3;
z-index: 5;
}
}
}

View File

@ -135,16 +135,16 @@
}
}
.input-group .form-control,
.input-group .form-select {
@include form-validation-state-selector($state) {
@if $state == "valid" {
z-index: 1;
} @else if $state == "invalid" {
z-index: 2;
}
&:focus {
z-index: 3;
.input-group {
> .form-control:not(:focus),
> .form-select:not(:focus),
> .form-floating:not(:focus-within) {
@include form-validation-state-selector($state) {
@if $state == "valid" {
z-index: 3;
} @else if $state == "invalid" {
z-index: 4;
}
}
}
}