|
1 | 1 | @use '../core/theming/theming';
|
2 | 2 | @use '../core/mdc-helpers/mdc-helpers';
|
3 | 3 | @use '../core/typography/typography';
|
4 |
| -@use '@material/card/elevated-card-theme' as mdc-elevated-card-theme; |
5 |
| -@use '@material/card/outlined-card-theme' as mdc-outlined-card-theme; |
| 4 | +@use '@material/card' as mdc-card; |
6 | 5 | @use '@material/typography' as mdc-typography;
|
7 | 6 | @use '@material/theme/theme-color' as mdc-theme-color;
|
8 | 7 | @use 'sass:color';
|
|
11 | 10 | @mixin color($config-or-theme) {
|
12 | 11 | $config: theming.get-color-config($config-or-theme);
|
13 | 12 | $foreground: map.get($config, foreground);
|
| 13 | + $is-dark-theme: map.get($config, is-dark); |
| 14 | + |
| 15 | + $orig-mdc-card-action-icon-color: mdc-card.$action-icon-color; |
| 16 | + $orig-mdc-card-outline-color: mdc-card.$outline-color; |
14 | 17 |
|
15 | 18 | @include mdc-helpers.using-mdc-theme($config) {
|
16 |
| - .mat-mdc-card { |
17 |
| - @include mdc-elevated-card-theme.theme(( |
18 |
| - container-color: mdc-theme-color.prop-value(surface), |
19 |
| - )); |
| 19 | + mdc-card.$action-icon-color: rgba(mdc-theme-color.prop-value(on-surface), |
| 20 | + mdc-theme-color.text-emphasis(medium)); |
| 21 | + mdc-card.$outline-color: color.mix(mdc-theme-color.prop-value(on-surface), |
| 22 | + mdc-theme-color.prop-value(surface), 12%); |
20 | 23 |
|
21 |
| - @include mdc-outlined-card-theme.theme(( |
22 |
| - outline-color: color.mix(mdc-theme-color.prop-value(on-surface), |
23 |
| - mdc-theme-color.prop-value(surface), 12%) |
24 |
| - )); |
25 |
| - } |
| 24 | + @include mdc-card.without-ripple($query: mdc-helpers.$mdc-theme-styles-query); |
26 | 25 |
|
27 | 26 | // Card subtitles are an Angular Material construct (not MDC), so we explicitly set their
|
28 | 27 | // color to secondary text here.
|
29 | 28 | .mat-mdc-card-subtitle {
|
30 | 29 | color: theming.get-color-from-palette($foreground, secondary-text);
|
31 | 30 | }
|
32 | 31 | }
|
| 32 | + |
| 33 | + mdc-card.$action-icon-color: $orig-mdc-card-action-icon-color; |
| 34 | + mdc-card.$outline-color: $orig-mdc-card-outline-color; |
33 | 35 | }
|
34 | 36 |
|
35 | 37 | @mixin typography($config-or-theme) {
|
36 | 38 | $config: typography.private-typography-to-2018-config(
|
37 | 39 | theming.get-typography-config($config-or-theme));
|
38 | 40 | @include mdc-helpers.using-mdc-typography($config) {
|
| 41 | + @include mdc-card.without-ripple($query: mdc-helpers.$mdc-typography-styles-query); |
| 42 | + |
39 | 43 | // Card subtitles and titles are an Angular Material construct (not MDC), so we explicitly
|
40 | 44 | // set their typographic styles here.
|
41 | 45 | .mat-mdc-card-title {
|
|
0 commit comments