|
| 1 | +@use 'sass:map'; |
1 | 2 | @use '@material/radio/radio' as mdc-radio;
|
2 | 3 | @use '@material/radio/radio-theme' as mdc-radio-theme;
|
3 | 4 | @use '@material/form-field' as mdc-form-field;
|
|
7 | 8 | @use '../../material/core/style/layout-common';
|
8 | 9 |
|
9 | 10 | @include mdc-helpers.disable-fallback-declarations {
|
10 |
| - @include mdc-radio.without-ripple($query: mdc-helpers.$mat-base-styles-without-animation-query); |
| 11 | + @include mdc-radio.static-styles($query: mdc-helpers.$mat-base-styles-query); |
11 | 12 | @include mdc-form-field.core-styles($query: mdc-helpers.$mat-base-styles-query);
|
12 | 13 | }
|
13 | 14 |
|
14 | 15 | .mat-mdc-radio-button {
|
15 |
| - &:not(._mat-animation-noopable) { |
16 |
| - @include mdc-helpers.disable-fallback-declarations { |
17 |
| - @include mdc-radio.without-ripple($query: animation); |
18 |
| - } |
19 |
| - } |
20 |
| - |
21 | 16 | .mdc-radio {
|
22 | 17 | // MDC theme styles also include structural styles so we have to include the theme at least
|
23 | 18 | // once here. The values will be overwritten by our own theme file afterwards.
|
24 | 19 | @include mdc-helpers.disable-fallback-declarations {
|
25 |
| - @include mdc-radio-theme.theme-styles(mdc-radio-theme.$light-theme); |
| 20 | + @include mdc-radio-theme.theme-styles(map.merge(mdc-radio-theme.$light-theme, ( |
| 21 | + // Exclude the styles we don't need. |
| 22 | + selected-focus-state-layer-color: null, |
| 23 | + selected-focus-state-layer-opacity: null, |
| 24 | + selected-hover-state-layer-color: null, |
| 25 | + selected-hover-state-layer-opacity: null, |
| 26 | + selected-pressed-state-layer-color: null, |
| 27 | + selected-pressed-state-layer-opacity: null, |
| 28 | + unselected-focus-icon-color: null, |
| 29 | + unselected-focus-state-layer-color: null, |
| 30 | + unselected-focus-state-layer-opacity: null, |
| 31 | + unselected-hover-state-layer-color: null, |
| 32 | + unselected-hover-state-layer-opacity: null, |
| 33 | + unselected-pressed-state-layer-color: null, |
| 34 | + unselected-pressed-state-layer-opacity: null, |
| 35 | + ))); |
26 | 36 | }
|
27 | 37 | }
|
28 | 38 |
|
|
33 | 43 | pointer-events: none;
|
34 | 44 | border-radius: 50%;
|
35 | 45 |
|
36 |
| - .mat-ripple-element:not(.mat-radio-persistent-ripple) { |
| 46 | + .mat-ripple-element { |
37 | 47 | opacity: mdc-radio-theme.$ripple-opacity;
|
38 | 48 | }
|
39 | 49 | }
|
| 50 | + |
| 51 | + &._mat-animation-noopable { |
| 52 | + .mdc-radio__background::before, |
| 53 | + .mdc-radio__outer-circle, |
| 54 | + .mdc-radio__inner-circle { |
| 55 | + // Needs to be `!important`, because MDC's selectors are really specific. |
| 56 | + transition: none !important; |
| 57 | + } |
| 58 | + } |
40 | 59 | }
|
41 | 60 |
|
42 | 61 | // Element used to provide a larger tap target for users on touch devices.
|
|
0 commit comments