1 | @use 'sass:map';
|
2 | @use '../core/style/private';
|
3 | @use '../core/theming/theming';
|
4 | @use '../core/typography/typography';
|
5 | @use '../core/typography/typography-utils';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | @mixin color($config-or-theme) {
|
11 | $config: theming.get-color-config($config-or-theme);
|
12 | $background: map.get($config, background);
|
13 | $foreground: map.get($config, foreground);
|
14 |
|
15 | .mat-dialog-container {
|
16 | @include private.private-theme-elevation(24, $config);
|
17 | background: theming.get-color-from-palette($background, dialog);
|
18 | color: theming.get-color-from-palette($foreground, text);
|
19 | }
|
20 | }
|
21 |
|
22 |
|
23 |
|
24 | @mixin typography($config-or-theme) {
|
25 | $config: typography.private-typography-to-2014-config(
|
26 | theming.get-typography-config($config-or-theme));
|
27 | .mat-dialog-title {
|
28 | @include typography-utils.typography-level($config, title);
|
29 | }
|
30 | }
|
31 |
|
32 | @mixin _density($config-or-theme) {}
|
33 |
|
34 |
|
35 |
|
36 | @mixin theme($theme-or-color-config) {
|
37 | $theme: theming.private-legacy-get-theme($theme-or-color-config);
|
38 | @include theming.private-check-duplicate-theme-styles($theme, 'mat-legacy-dialog') {
|
39 | $color: theming.get-color-config($theme);
|
40 | $density: theming.get-density-config($theme);
|
41 | $typography: theming.get-typography-config($theme);
|
42 |
|
43 | @if $color != null {
|
44 | @include color($color);
|
45 | }
|
46 | @if $density != null {
|
47 | @include _density($density);
|
48 | }
|
49 | @if $typography != null {
|
50 | @include typography($typography);
|
51 | }
|
52 | }
|
53 | }
|