Skip to content

Commit 59ea116

Browse files
crisbetommalerba
authored andcommitted
fix(material-experimental/mdc-list): don't override focus styles with hover (#23840)
Fixes that the `:hover` styles were overriding the `:focus` and selected effects of the MDC-based `mat-list-option`. (cherry picked from commit edc2aa3)
1 parent 759d85a commit 59ea116

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/material-experimental/mdc-list/_interactive-list-theme.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
// MDC still shows focus/selected state if the item is disabled.
2828
// Just hover styles should not show up for disabled items.
29-
.mat-mdc-list-item-interactive:not(.mdc-list-item--disabled) {
30-
&:hover::before {
29+
.mat-mdc-list-item-interactive:not(.mdc-list-item--disabled):not(.mdc-list-item--selected) {
30+
&:not(:focus):hover::before {
3131
opacity: mdc-ripple.states-opacity($active-base-color, hover);
3232
}
3333
}

0 commit comments

Comments
 (0)