File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
src/material-experimental/mdc-list Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1
1
@use ' ../mdc-helpers/mdc-helpers' ;
2
2
@use ' ../../material/core/style/layout-common' ;
3
+ @use ' ../../cdk/a11y/a11y' ;
3
4
@import ' @material/list/mixins.import' ;
4
5
@import ' @material/list/variables.import' ;
5
6
125
126
@include layout-common .fill ();
126
127
pointer-events : none ;
127
128
}
129
+
130
+
131
+ @include a11y .high-contrast (active , off) {
132
+ .mat-mdc-list-option ,
133
+ .mat-mdc-nav-list .mat-mdc-list-item ,
134
+ .mat-mdc-action-list .mat-mdc-list-item {
135
+ & :hover , & :focus {
136
+ outline : dotted 1px ;
137
+ }
138
+ }
139
+
140
+ // In single selection mode, the selected option is indicated by changing its
141
+ // background color, but that doesn't work in high contrast mode. We add an
142
+ // alternate indication by rendering out a circle.
143
+ .mat-mdc-list-option.mdc-list-item--selected ::after {
144
+ $size : 10px ;
145
+ content : ' ' ;
146
+ position : absolute ;
147
+ top : 50% ;
148
+ right : $mdc-list-side-padding ;
149
+ transform : translateY (-50% );
150
+ width : $size ;
151
+ height : 0 ;
152
+ border-bottom : solid $size ;
153
+ border-radius : $size ;
154
+ }
155
+
156
+ [dir = ' rtl' ] .mat-mdc-list-option.mdc-list-item--selected ::after {
157
+ right : auto ;
158
+ left : $mdc-list-side-padding ;
159
+ }
160
+ }
You can’t perform that action at this time.
0 commit comments