-
Notifications
You must be signed in to change notification settings - Fork 9
/
theme-bases.scss
163 lines (145 loc) · 5.53 KB
/
theme-bases.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
@use 'sass:map';
@use '@angular/material' as mat;
@use '@brightlayer-ui/colors/palette.scss' as blui;
@use './darkTheme';
@use './blueTheme';
@use './blui-component-theme';
@use './margins';
@use './fonts';
@use './typography';
@use './common';
mat.$theme-ignore-duplication-warnings: true;
@mixin sharedConfig() {
@include margins.reasonable-margins();
@include fonts.bodyfont();
@include typography.typography();
@include common.common();
}
$blui-blue-primary: mat.define-palette(blui.$blui-blue);
$blui-blue-accent: mat.define-palette(blui.$blui-lightBlue);
$blui-blue-warn: mat.define-palette(blui.$blui-red);
$typography-config: mat.define-legacy-typography-config(
$font-family: '"Open Sans", Arial, Helvetica, sans-serif',
$display-4: mat.define-typography-level(6rem, 1.167, 300),
$display-2: mat.define-typography-level(3rem, 1.167, 400),
$display-1: mat.define-typography-level(2.125rem, 1.235, 400),
$headline: mat.define-typography-level(1.5rem, 1.334, 400),
$title: mat.define-typography-level(1.25rem, 1.6, 600),
$subheading-2: mat.define-typography-level(1rem, 1.75, 400),
$subheading-1: mat.define-typography-level(0.875rem, 1.57, 600),
$body-2: mat.define-typography-level(0.875rem, 1.43, 500),
$body-1: mat.define-typography-level(1rem, 1.5, 400),
$caption: mat.define-typography-level(0.75rem, 1.66, 400),
$button: mat.define-typography-level(0.875rem, 1, 600),
$input: mat.define-typography-level(inherit, 1.125, 400),
);
@function blui-light-theme($primary, $accent, $warn) {
$theme: (
color: (
primary: $primary,
accent: $accent,
warn: $warn,
),
typography: $typography-config,
density: 0,
);
@return map.deep-merge(
mat.define-light-theme($theme),
(
color: (
foreground: (
text: map-get(blui.$blui-black, 500),
disabled: rgba(map-get(blui.$blui-black, 500), 0.3),
),
),
foreground: (
onPrimary: map-get(blui.$blui-white, 50),
onAccent: map-get(blui.$blui-white, 50),
onWarn: map-get(blui.$blui-white, 50),
text: map-get(blui.$blui-black, 500),
secondary-text: map-get(blui.$blui-gray, 500),
hint-text: map-get(blui.$blui-gray, 500),
base: map-get(blui.$blui-darkBlack, 900),
divider: rgba(map-get(blui.$blui-black, 500), 0.12),
disabled: rgba(map-get(blui.$blui-black, 500), 0.3),
icon: rgba(black, 0.54),
icons: rgba(black, 0.54),
),
background: (
card: map-get(blui.$blui-white, 50),
dialog: map-get(blui.$blui-white, 50),
disabled-button: rgba(114, 126, 132, 0.12),
disabled-button-toggle: map-get(blui.$blui-gray, 200),
),
)
);
}
@mixin light-theme($primary, $accent, $warn) {
$theme: blui-light-theme($primary, $accent, $warn);
@include sharedConfig();
@include mat.all-legacy-component-themes($theme);
@include blui-component-theme.blui-components-theme($theme);
@include blueTheme.bluetheme($theme);
}
@mixin blue() {
@include shared();
@include light-theme($blui-blue-primary, $blui-blue-accent, $blui-blue-warn);
}
$blui-blue-dark-primary: mat.define-palette(blui.$blui-blue);
$blui-blue-dark-accent: mat.define-palette(blui.$blui-lightBlue, 200);
$blui-blue-dark-warn: mat.define-palette(blui.$blui-red, 200);
@function blui-dark-theme($primary, $accent, $warn) {
$theme: (
color: (
primary: $primary,
accent: $accent,
warn: $warn,
),
typography: $typography-config,
density: 0,
);
@return map.deep-merge(
mat.define-dark-theme($theme),
(
color: (
foreground: (
text: map-get(blui.$blui-black, 50),
disabled: rgba(map-get(blui.$blui-black, 300), 0.3),
divider: rgba(map-get(blui.$blui-black, 200), 0.36),
),
),
foreground: (
text: map-get(blui.$blui-black, 50),
secondary-text: map-get(blui.$blui-black, 200),
hint-text: map-get(blui.$blui-gray, 300),
base: map-get(blui.$blui-white, 50),
divider: rgba(map-get(blui.$blui-black, 200), 0.36),
disabled: rgba(map-get(blui.$blui-black, 300), 0.36),
icon: map-get(blui.$blui-black, 50),
icons: map-get(blui.$blui-black, 50),
),
background: (
app-bar: map-get(blui.$blui-darkBlack, 100),
card: map-get(blui.$blui-black, 900),
dialog: map-get(blui.$blui-black, 900),
disabled-button: rgba(white, 0.12),
disabled-button-toggle: black,
),
)
);
}
@mixin dark-theme($primary, $accent, $warn) {
$theme: blui-dark-theme($primary, $accent, $warn);
@include sharedConfig();
@include mat.all-legacy-component-themes($theme);
@include blui-component-theme.blui-components-theme($theme);
@include darkTheme.darktheme($theme);
}
@mixin blueDark() {
@include shared();
@include dark-theme($blui-blue-dark-primary, $blui-blue-dark-accent, $blui-blue-dark-warn);
}
@mixin shared() {
@include mat.legacy-typography-hierarchy($typography-config);
@include mat.legacy-core();
}