Skip to content

Commit

Permalink
Explicitly target .btn-check and undo :hover (#37165)
Browse files Browse the repository at this point in the history
rather than the other way around, which caused specificity issues
  • Loading branch information
patrickhlauke committed Sep 20, 2022
1 parent 636bb49 commit 2be9cd5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scss/_buttons.scss
Expand Up @@ -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));
Expand Down

0 comments on commit 2be9cd5

Please sign in to comment.