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