Skip to content

Commit ef14c28

Browse files
committed
fix(material/core): option showing double selected indicator in high contrast mode
Fixes that `mat-option` was showing a checkmark and a dot for selected options in high contrast mode. The dot is still necessary if the single selection indicator isn't shown.
1 parent 9122335 commit ef14c28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/material/core/option/option.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ $_side-padding: 16px;
157157
// In single selection mode, the selected option is indicated by changing its
158158
// background color, but that doesn't work in high contrast mode. We add an
159159
// alternate indication by rendering out a circle.
160-
&.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after {
160+
&.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after {
161161
$size: 10px;
162162
content: '';
163163
position: absolute;
@@ -170,7 +170,7 @@ $_side-padding: 16px;
170170
border-radius: $size;
171171
}
172172

173-
[dir='rtl'] &.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after {
173+
[dir='rtl'] &.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after {
174174
right: auto;
175175
left: $_side-padding;
176176
}

0 commit comments

Comments
 (0)