Skip to content

Commit b31ae14

Browse files
committed
fix(list): fix up disabled list item styles
Fixes a couple of issues with the list item's disabled styles: - In dark themes we were setting the disabled styles to black. This looks out of place since it's not how other components style themselves under dark themes. - The disabled styles are somewhat similar to the selected styles. These changes also set the text color to the disabled text color to make it easier to distinguish.
1 parent 7c75d6e commit b31ae14

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/material/core/theming/_palette.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ $mat-dark-theme-background: (
704704
selected-disabled-button: map_get($mat-grey, 800),
705705
disabled-button-toggle: black,
706706
unselected-chip: map_get($mat-grey, 700),
707-
disabled-list-option: black,
707+
disabled-list-option: rgba(white, 0.12),
708708
tooltip: map_get($mat-grey, 700),
709709
);
710710

src/material/list/_list-theme.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
.mat-subheader {
2121
color: mat-color($foreground, secondary-text);
2222
}
23-
}
2423

25-
.mat-list-item-disabled {
26-
background-color: mat-color($background, disabled-list-option);
24+
.mat-list-item-disabled {
25+
background-color: mat-color($background, disabled-list-option);
26+
color: mat-color($foreground, disabled-text);
27+
}
2728
}
2829

2930
.mat-list-option,

0 commit comments

Comments
 (0)