Explicitly target `.btn-check` and undo `:hover` (#37165)

rather than the other way around, which caused specificity issues
This commit is contained in:
Patrick H. Lauke 2022-09-20 14:15:46 +01:00 committed by GitHub
parent 636bb496c9
commit 2be9cd59ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -40,14 +40,20 @@
@include box-shadow(var(--#{$prefix}btn-box-shadow));
@include transition($btn-transition);
:not(.btn-check) + &:hover,
&:first-child:hover {
&:hover {
color: var(--#{$prefix}btn-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
background-color: var(--#{$prefix}btn-hover-bg);
border-color: var(--#{$prefix}btn-hover-border-color);
}
.btn-check + &:hover {
// override for the checkbox/radio buttons
color: var(--#{$prefix}btn-color);
background-color: var(--#{$prefix}btn-bg);
border-color: var(--#{$prefix}btn-border-color);
}
&:focus-visible {
color: var(--#{$prefix}btn-hover-color);
@include gradient-bg(var(--#{$prefix}btn-hover-bg));