|
1 |
| -@use '@material/checkbox' as mdc-checkbox; |
| 1 | +@use '@material/checkbox/checkbox' as mdc-checkbox; |
2 | 2 | @use '@material/checkbox/checkbox-theme' as mdc-checkbox-theme;
|
3 | 3 | @use '@material/form-field' as mdc-form-field;
|
4 | 4 | @use '@material/ripple' as mdc-ripple;
|
|
9 | 9 | @use '../../material/core/style/layout-common';
|
10 | 10 | @use '../../material/core/style/vendor-prefixes';
|
11 | 11 |
|
12 |
| -@include mdc-checkbox.without-ripple($query: mdc-helpers.$mat-base-styles-query); |
13 |
| -@include mdc-form-field.core-styles($query: mdc-helpers.$mat-base-styles-query); |
| 12 | +@include mdc-helpers.disable-fallback-declarations { |
| 13 | + @include mdc-checkbox.static-styles($query: mdc-helpers.$mat-base-styles-query); |
| 14 | + @include mdc-form-field.core-styles($query: mdc-helpers.$mat-base-styles-query); |
| 15 | +} |
14 | 16 |
|
15 | 17 | // Apply base styles to the MDC ripple to adjust appearance for state changes (hover, focus, press)
|
16 | 18 | @mixin _ripple-base-styles() {
|
|
27 | 29 | .mdc-checkbox {
|
28 | 30 | // MDC theme styles also include structural styles so we have to include the theme at least
|
29 | 31 | // once here. The values will be overwritten by our own theme file afterwards.
|
30 |
| - @include mdc-checkbox-theme.theme-styles(mdc-checkbox-theme.$light-theme); |
| 32 | + @include mdc-helpers.disable-fallback-declarations { |
| 33 | + @include mdc-checkbox-theme.theme-styles(map.merge(mdc-checkbox-theme.$light-theme, ( |
| 34 | + // Exclude all of the ripple-related styles. |
| 35 | + selected-focus-state-layer-color: null, |
| 36 | + selected-focus-state-layer-opacity: null, |
| 37 | + selected-hover-state-layer-color: null, |
| 38 | + selected-hover-state-layer-opacity: null, |
| 39 | + selected-pressed-state-layer-color: null, |
| 40 | + selected-pressed-state-layer-opacity: null, |
| 41 | + unselected-focus-state-layer-color: null, |
| 42 | + unselected-focus-state-layer-opacity: null, |
| 43 | + unselected-hover-state-layer-color: null, |
| 44 | + unselected-hover-state-layer-opacity: null, |
| 45 | + unselected-pressed-state-layer-color: null, |
| 46 | + unselected-pressed-state-layer-opacity: null, |
| 47 | + ))); |
| 48 | + } |
31 | 49 |
|
32 | 50 | // The MDC checkbox styles related to the hover state are intertwined with the MDC ripple
|
33 | 51 | // styles. We currently don't use the MDC ripple due to size concerns, therefore we need to
|
|
0 commit comments