Skip to content

Commit 32339ee

Browse files
committed
cleanup on styles
1 parent 0d608f0 commit 32339ee

File tree

3 files changed

+30
-35
lines changed

3 files changed

+30
-35
lines changed

apps/app/src/styles.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@use '@angular/material' as mat;
2-
@use './styles/m3-theme.scss' as m3-theme;
2+
@use './styles/theme.scss' as theme;
33
@use '../../../libs/frontend/root/theme' as frontend-root;
44

55
/* You can add global styles to this file, and also import other style files */
@@ -15,11 +15,11 @@ body {
1515
@include mat.core();
1616

1717
html {
18-
@include mat.all-component-themes(m3-theme.$dark-theme);
19-
@include frontend-root.theme(m3-theme.$dark-theme);
18+
@include mat.all-component-themes(theme.$dark-theme);
19+
@include frontend-root.theme(theme.$dark-theme);
2020

2121
@media (prefers-color-scheme: light) {
22-
@include mat.all-component-colors(m3-theme.$light-theme);
23-
@include frontend-root.theme(m3-theme.$light-theme);
22+
@include mat.all-component-colors(theme.$light-theme);
23+
@include frontend-root.theme(theme.$light-theme);
2424
}
2525
}

apps/app/src/styles/m3-theme.scss

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use 'sass:map';
12
@use '@angular/material' as mat;
23

34
/// Defines a dark color theme with success and danger colors.
@@ -7,7 +8,7 @@
78
/// @param {Map} $success The success color map.
89
/// @param {Map} $danger The danger color map.
910

10-
@function badman-theme(
11+
@function define-theme(
1112
$primary,
1213
$type: dark,
1314
$warn: $mat-orange,
@@ -22,7 +23,7 @@
2223
primary: $primary,
2324
),
2425
density: (
25-
scale: $density
26+
scale: $density,
2627
),
2728
)
2829
);
@@ -34,3 +35,25 @@
3435
);
3536
@return map-merge($theme, $rest);
3637
}
38+
39+
$theme-warn: mat.$orange-palette;
40+
$theme-success: mat.$green-palette;
41+
$theme-danger: mat.$red-palette;
42+
43+
$dark-theme: define-theme(
44+
mat.$blue-palette,
45+
dark,
46+
$theme-warn,
47+
$theme-success,
48+
$theme-danger,
49+
-2
50+
);
51+
52+
$light-theme: define-theme(
53+
mat.$violet-palette,
54+
light,
55+
$theme-warn,
56+
$theme-success,
57+
$theme-danger,
58+
-2
59+
);

0 commit comments

Comments
 (0)