|
3 | 3 | @use '@material/radio/radio-theme' as mdc-radio-theme; |
4 | 4 | @use '@material/form-field' as mdc-form-field; |
5 | 5 | @use '@material/touch-target' as mdc-touch-target; |
| 6 | +@use '@material/ripple' as mdc-ripple; |
6 | 7 | @use '../mdc-helpers/mdc-helpers'; |
7 | 8 | @use '../../cdk/a11y'; |
8 | 9 | @use '../../material/core/style/layout-common'; |
|
33 | 34 | unselected-pressed-state-layer-color: null, |
34 | 35 | unselected-pressed-state-layer-opacity: null, |
35 | 36 | ))); |
| 37 | + |
| 38 | + // TODO(crisbeto): this should be included by MDC's `theme-styles`, but it isn't currently. |
| 39 | + @include mdc-radio-theme.focus-indicator-color( |
| 40 | + var(--mat-mdc-radio-ripple-color, transparent)); |
| 41 | + } |
| 42 | + |
| 43 | + // MDC's hover indication comes from their ripple which we don't use. |
| 44 | + &:hover .mdc-radio__native-control:not([disabled]):not(:focus) { |
| 45 | + & ~ .mdc-radio__background::before { |
| 46 | + opacity: map.get(mdc-ripple.$dark-ink-opacities, hover); |
| 47 | + transform: scale(1); |
| 48 | + } |
36 | 49 | } |
37 | 50 | } |
38 | 51 |
|
| 52 | + &.mat-mdc-radio-checked { |
| 53 | + // TODO(crisbeto): this should be included by MDC's `theme-styles`, but it isn't currently. |
| 54 | + @include mdc-radio-theme.focus-indicator-color( |
| 55 | + var(--mat-mdc-radio-checked-ripple-color, transparent)); |
| 56 | + } |
| 57 | + |
39 | 58 | // This is necessary because we do not depend on MDC's ripple, but have our own that should be |
40 | 59 | // positioned correctly. This can be removed once we start using MDC's ripple implementation. |
41 | 60 | .mat-radio-ripple { |
|
0 commit comments