/
theme-token-api.scss
53 lines (45 loc) · 1.13 KB
/
theme-token-api.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@use '@angular/material' as mat;
@use '@angular/material-experimental';
dev-app {
&::before {
content: 'Using experimental theming API';
display: inline-block;
position: fixed;
z-index: 100;
bottom: 0;
left: 50%;
transform: translateX(-50%);
padding: 8px;
background: red;
color: white;
}
}
.demo-unicorn-dark-theme {
background: black;
color: white;
}
@include mat.core();
$dark-theme: mat.define-dark-theme((
color: (
primary: mat.define-palette(mat.$blue-grey-palette),
accent: mat.define-palette(mat.$amber-palette, A200, A100, A400),
warn: mat.define-palette(mat.$deep-orange-palette),
),
typography: mat.define-typography-config(),
density: 0,
));
// Set up light theme.
@include material-experimental.theme($components: (
material-experimental.card(),
material-experimental.checkbox(),
));
// Set up dark theme.
.demo-unicorn-dark-theme {
@include material-experimental.theme($tokens: mat.m2-tokens-from-theme($dark-theme), $components: (
material-experimental.checkbox((
(mdc, checkbox): (
selected-checkmark-color: red,
)
)),
));
}