Skip to content

Commit 2eff545

Browse files
authored
fix(list): single selection list selected state not shown on touch devices (#19877)
We have some extra CSS rules to prevent sticky hover states on touch devices. The problem is that we use the hover style to indicate a selected item in a single selection list and it breaks in a way that prevents the selected state from showing up for touch devices. These changes make the selector more specific to avoid the issue. Fixes #19876.
1 parent 6f83ed2 commit 2eff545

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/material/list/list.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ mat-action-list {
350350
// enhancement and not all desktop browsers support this kind of media query, we can't
351351
// use something like `@media (hover)`.
352352
@media (hover: none) {
353-
.mat-list-option,
353+
.mat-list-option:not(.mat-list-single-selected-option),
354354
.mat-nav-list .mat-list-item,
355355
.mat-action-list .mat-list-item {
356356
&:not(.mat-list-item-disabled):hover {

0 commit comments

Comments
 (0)