|
| 1 | +@use 'sass:map'; |
1 | 2 | @use '@material/dialog' as mdc-dialog;
|
| 3 | +@use '@material/dialog/dialog-theme' as mdc-dialog-theme; |
| 4 | +@use '@material/theme/theme-color' as mdc-theme-color; |
| 5 | +@use '@material/typography' as mdc-typography; |
2 | 6 | @use '../mdc-helpers/mdc-helpers';
|
3 | 7 | @use '../../material/core/typography/typography';
|
4 | 8 | @use '../../material/core/theming/theming';
|
5 | 9 |
|
6 | 10 | @mixin color($config-or-theme) {
|
7 | 11 | $config: theming.get-color-config($config-or-theme);
|
| 12 | + |
8 | 13 | @include mdc-helpers.mat-using-mdc-theme($config) {
|
9 |
| - @include mdc-dialog.core-styles($query: mdc-helpers.$mat-theme-styles-query); |
| 14 | + .mat-mdc-dialog-container { |
| 15 | + $surface: mdc-theme-color.$surface; |
| 16 | + $on-surface: mdc-theme-color.$on-surface; |
| 17 | + $text-emphasis-high: mdc-theme-color.text-emphasis(high); |
| 18 | + $text-emphasis-medium: mdc-theme-color.text-emphasis(medium); |
| 19 | + |
| 20 | + @include mdc-dialog-theme.theme(( |
| 21 | + container-color: $surface, |
| 22 | + container-elevation: 24, |
| 23 | + container-shadow-color: $on-surface, |
| 24 | + with-divider-divider-color: rgba($on-surface, mdc-dialog.$scroll-divider-opacity), |
| 25 | + subhead-color: rgba($on-surface, $text-emphasis-high), |
| 26 | + supporting-text-color: rgba($on-surface, $text-emphasis-medium), |
| 27 | + )); |
| 28 | + } |
10 | 29 | }
|
11 | 30 | }
|
12 | 31 |
|
13 | 32 | @mixin typography($config-or-theme) {
|
14 | 33 | $config: typography.private-typography-to-2018-config(
|
15 | 34 | theming.get-typography-config($config-or-theme));
|
16 | 35 | @include mdc-helpers.mat-using-mdc-typography($config) {
|
17 |
| - @include mdc-dialog.core-styles($query: mdc-helpers.$mat-typography-styles-query); |
| 36 | + .mat-mdc-dialog-container { |
| 37 | + $styles: mdc-typography.$styles; |
| 38 | + $headline6: map.get($styles, headline6); |
| 39 | + |
| 40 | + @include mdc-dialog-theme.theme(( |
| 41 | + subhead-font: map.get($headline6, font-family), |
| 42 | + subhead-line-height: map.get($styles, headline6, line-height), |
| 43 | + subhead-size: map.get($styles, headline6, font-size), |
| 44 | + subhead-weight: map.get($styles, headline6, font-weight), |
| 45 | + subhead-tracking: map.get($styles, headline6, letter-spacing), |
| 46 | + |
| 47 | + supporting-text-font: map.get($styles, body1, font-family), |
| 48 | + supporting-text-line-height: map.get($styles, body1, line-height), |
| 49 | + supporting-text-size: map.get($styles, body1, font-size), |
| 50 | + supporting-text-weight: map.get($styles, body1, font-weight), |
| 51 | + supporting-text-tracking: map.get($styles, body1, letter-spacing), |
| 52 | + )); |
| 53 | + } |
18 | 54 | }
|
19 | 55 | }
|
20 | 56 |
|
|
0 commit comments