|
1 | 1 | @use '@angular/cdk';
|
2 | 2 | @use '@angular/material' as mat;
|
| 3 | +@use '@angular/cdk'; |
3 | 4 | @use '@material/list/evolution-mixins' as mdc-list-mixins;
|
4 | 5 | @use '@material/list/evolution-variables' as mdc-list-variables;
|
5 | 6 | @use 'sass:map';
|
|
26 | 27 | $height-config: map.get(mdc-list-variables.$one-line-item-density-config, height);
|
27 | 28 | min-height: map.get($height-config, default);
|
28 | 29 |
|
29 |
| - // Workaround for https://goo.gl/pFmjJD in IE 11. Adds a pseudo |
30 |
| - // element that will stretch the option to the correct height. See: |
31 |
| - // https://connect.microsoft.com/IE/feedback/details/802625 |
32 |
| - &::after { |
33 |
| - display: inline-block; |
34 |
| - min-height: inherit; |
35 |
| - content: ''; |
36 |
| - } |
37 |
| - |
38 | 30 | &.mdc-list-item--disabled {
|
39 | 31 | // This is the same as `mdc-list-mixins.list-disabled-opacity` which
|
40 | 32 | // we can't use directly, because it comes with some selectors.
|
|
89 | 81 | text-decoration: inherit;
|
90 | 82 | text-transform: inherit;
|
91 | 83 | }
|
| 84 | + |
| 85 | + @include cdk.high-contrast(active, off) { |
| 86 | + // In single selection mode, the selected option is indicated by changing its |
| 87 | + // background color, but that doesn't work in high contrast mode. We add an |
| 88 | + // alternate indication by rendering out a circle. |
| 89 | + &.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after { |
| 90 | + $size: 10px; |
| 91 | + content: ''; |
| 92 | + position: absolute; |
| 93 | + top: 50%; |
| 94 | + right: mdc-list-variables.$side-padding; |
| 95 | + transform: translateY(-50%); |
| 96 | + width: $size; |
| 97 | + height: 0; |
| 98 | + border-bottom: solid $size; |
| 99 | + border-radius: $size; |
| 100 | + } |
| 101 | + |
| 102 | + [dir='rtl'] &.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after { |
| 103 | + right: auto; |
| 104 | + left: mdc-list-variables.$side-padding; |
| 105 | + } |
| 106 | + } |
92 | 107 | }
|
93 | 108 |
|
94 | 109 | .mat-mdc-option-active {
|
|
0 commit comments