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