Skip to content

Commit c61cb64

Browse files
authored
Merge pull request #313 from erikmom/chore-migrate-to-material-3
chore: Migrate to Material 3
2 parents 2aa7406 + b785bf5 commit c61cb64

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.9.0
1+
v20.11.1

src/app/main/main.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mat-toolbar color="primary">
1+
<mat-toolbar color="primary" class="top-toolbar">
22
<img src="/assets/ewok-no-bg.png" alt="EWOK" class="logo" />
33
</mat-toolbar>
44

src/styles.scss

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,40 @@
44

55
@include mat.core();
66

7-
$my-primary: mat.m2-define-palette(mat.$m2-indigo-palette, 500);
8-
$my-accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
9-
10-
$my-theme: mat.m2-define-light-theme(
7+
$theme: mat.define-theme(
118
(
129
color: (
13-
primary: $my-primary,
14-
accent: $my-accent,
10+
theme-type: light,
11+
primary: mat.$blue-palette,
12+
),
13+
typography: (
14+
brand-family: 'Comic Sans',
15+
bold-weight: 900,
16+
),
17+
density: (
18+
scale: -1,
1519
),
16-
density: 0,
1720
)
1821
);
1922

20-
@include mat.all-component-themes($my-theme);
23+
html {
24+
@include mat.core-theme($theme);
25+
26+
// Include styles for all material components used in the application
27+
@include mat.button-theme($theme);
28+
@include mat.card-theme($theme);
29+
@include mat.form-field-theme($theme);
30+
@include mat.list-theme($theme);
31+
@include mat.option-theme($theme);
32+
@include mat.select-theme($theme);
33+
@include mat.slide-toggle-theme($theme);
34+
@include mat.toolbar-theme($theme);
35+
}
36+
37+
// Override the theme for a specific component
38+
.top-toolbar {
39+
--mat-toolbar-container-background-color: #3f51b5;
40+
}
2141

2242
html,
2343
body,

0 commit comments

Comments
 (0)