|
4 | 4 | @use '../../../theming/inspection';
|
5 | 5 | @use '../../../style/sass-utils';
|
6 | 6 | @use '../../token-utils';
|
7 |
| -@use '@material/theme/theme-color' as mdc-theme-color; |
8 | 7 |
|
9 | 8 | // The prefix used to generate the fully qualified name for tokens in this file.
|
10 | 9 | $prefix: (mdc, checkbox);
|
11 | 10 |
|
12 |
| -// MDC logs a warning if the `contrast-tone` function is called with a CSS variable. |
13 |
| -// This function falls back to determining the tone based on whether the theme is light or dark. |
14 |
| -@function _contrast-tone($value, $is-dark, $light-color: '#fff', $dark-color: '#000') { |
15 |
| - @if ($value == 'dark' or $value == 'light' or type-of($value) == 'color') { |
16 |
| - @return if(mdc-theme-color.contrast-tone($value) == 'dark', $dark-color, $light-color); |
17 |
| - } |
18 |
| - |
19 |
| - @return if($is-dark, $light-color, $dark-color); |
20 |
| -} |
21 |
| - |
22 | 11 | // Tokens that can't be configured through Angular Material's current theming API,
|
23 | 12 | // but may be in a future version of the theming API.
|
24 | 13 | //
|
@@ -69,7 +58,8 @@ $prefix: (mdc, checkbox);
|
69 | 58 | // The color of the checkbox border when the checkbox is unselected and disabled.
|
70 | 59 | disabled-unselected-icon-color: $disabled-color,
|
71 | 60 | // The color of the checkmark when the checkbox is selected.
|
72 |
| - selected-checkmark-color: _contrast-tone($palette-selected, $is-dark), |
| 61 | + selected-checkmark-color: |
| 62 | + inspection.get-theme-color($theme, $palette-name, default-contrast, 1), |
73 | 63 | // The color of the checkbox fill when the checkbox is selected and focused.
|
74 | 64 | selected-focus-icon-color: $palette-selected,
|
75 | 65 | // The color of the checkbox fill when the checkbox is selected and hovered.
|
|
0 commit comments