Skip to content

Commit fd5f3da

Browse files
crisbetommalerba
authored andcommitted
fix(material-experimental/mdc-list): fix selected indication in high contrast mode (#23242)
We have some special handling for single selection lists in high contrast mode which wasn't switched to the non-deprecated list styles. (cherry picked from commit 4af0547)
1 parent 6a6a953 commit fd5f3da

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/material-experimental/mdc-list/list-option.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@use '@material/checkbox' as mdc-checkbox;
2-
@use '@material/list' as mdc-list;
2+
@use '@material/list/evolution-variables' as mdc-list-variables;
33
@use '../mdc-helpers/mdc-helpers';
44
@use '../../cdk/a11y';
55
@use './list-option-trailing-avatar-compat';
@@ -33,21 +33,21 @@
3333
// In single selection mode, the selected option is indicated by changing its
3434
// background color, but that doesn't work in high contrast mode. We add an
3535
// alternate indication by rendering out a circle.
36-
.mat-mdc-list-option.mdc-deprecated-list-item--selected::after {
36+
.mat-mdc-list-option.mdc-list-item--selected::after {
3737
$size: 10px;
3838
content: '';
3939
position: absolute;
4040
top: 50%;
41-
right: mdc-list.$deprecated-side-padding;
41+
right: mdc-list-variables.$side-padding;
4242
transform: translateY(-50%);
4343
width: $size;
4444
height: 0;
4545
border-bottom: solid $size;
4646
border-radius: $size;
4747
}
4848

49-
[dir='rtl'] .mat-mdc-list-option.mdc-deprecated-list-item--selected::after {
49+
[dir='rtl'] .mat-mdc-list-option.mdc-list-item--selected::after {
5050
right: auto;
51-
left: mdc-list.$deprecated-side-padding;
51+
left: mdc-list-variables.$side-padding;
5252
}
5353
}

0 commit comments

Comments
 (0)