summaryrefslogtreecommitdiffstats
path: root/src/_themes.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/_themes.scss')
-rw-r--r--src/_themes.scss214
1 files changed, 214 insertions, 0 deletions
diff --git a/src/_themes.scss b/src/_themes.scss
new file mode 100644
index 0000000..a90d049
--- /dev/null
+++ b/src/_themes.scss
@@ -0,0 +1,214 @@
1@use 'sass:list';
2@use 'sass:map';
3@use 'sass:math';
4@use 'iro-sass/src/easing' as easing;
5@use 'include-media/dist/include-media' as media;
6
7$palette-chroma-easing: 'ease' !default;
8
9$static-colors-override: () !default;
10$static-colors: map.deep-merge((
11 --base: hsl(0, 0%, 98%),
12
13 --contrasts: (
14 --100: math.div(0, 12) * 110 - 10,
15 --200: math.div(1, 12) * 110 - 10,
16 --300: math.div(2, 12) * 110 - 10,
17 --400: math.div(3, 12) * 110 - 10,
18 --500: math.div(4, 12) * 110 - 10,
19 --600: math.div(5, 12) * 110 - 10,
20 --700: math.div(6, 12) * 110 - 10,
21 --800: math.div(7, 12) * 110 - 10,
22 --900: math.div(8, 12) * 110 - 10,
23 --1000: math.div(9, 12) * 110 - 10,
24 --1100: math.div(10, 12) * 110 - 10,
25 --1200: math.div(11, 12) * 110 - 10,
26 --1300: math.div(12, 12) * 110 - 10,
27 ),
28
29 --palettes: (
30 --blue: oklch(56% .14 275.25),
31 --purple: oklch(56% .14 305.58),
32 --red: oklch(56% .14 14.69),
33 --green: oklch(56% .14 150.48),
34 --yellow: oklch(56% .14 84.08),
35 ),
36
37 --transparents: (
38 --100: 0,
39 --200: .1,
40 --300: .25,
41 --400: .4,
42 --500: .55,
43 --600: .7,
44 --700: .8,
45 --800: .9,
46 --900: 1,
47 ),
48), $static-colors-override) !default;
49
50$semantic-colors-common-override: () !default;
51$semantic-colors-common: map.deep-merge((
52 --accent: --theme --blue,
53 --accent-static: --static --blue,
54 --positive: --theme --green,
55 --positive-static: --static --green,
56 --negative: --theme --red,
57 --negative-static: --static --red,
58 --warning: --theme --yellow,
59 --warning-static: --static --yellow,
60
61 --focus-raw: --theme --accent,
62 --focus-static: --theme --accent-static,
63
64 --border-mute: --theme --base --200,
65 --border: --theme --base --300,
66 --border-strong: --theme --base --400,
67
68 --text-disabled: --theme --base --500,
69 --text-mute-more: --theme --base --600,
70 --text-mute: --theme --base --700,
71 --text: --theme --base --800,
72 --heading: --theme --base --900,
73
74 --focus: (
75 --outline: --theme --focus-raw --400,
76 --border-mute: --theme --focus-raw --900,
77 --border: --theme --focus-raw --1000,
78 --border-text: --theme --focus-raw --1000-text,
79 --border-strong: --theme --focus-raw --1100,
80 --text: --theme --focus-raw --1100,
81 ),
82), $semantic-colors-common-override) !default;
83
84$theme-light-override: () !default;
85$theme-light: map.deep-merge((
86 --contrasts: (
87 --grays: (
88 --50: -8,
89 --75: -4,
90 --100: 0,
91
92 --200: easing.cubic-bezier(.2, .1, .9, .9, math.div(1, 7)) * 98,
93 --300: easing.cubic-bezier(.2, .1, .9, .9, math.div(2, 7)) * 98,
94 --400: easing.cubic-bezier(.2, .1, .9, .9, math.div(3, 7)) * 98,
95
96 --500: easing.cubic-bezier(.2, .1, .9, .9, math.div(4, 7)) * 98,
97 --600: easing.cubic-bezier(.2, .1, .9, .9, math.div(5, 7)) * 98,
98 --700: easing.cubic-bezier(.2, .1, .9, .9, math.div(6, 7)) * 98,
99 --800: easing.cubic-bezier(.2, .1, .9, .9, math.div(7, 7)) * 98,
100 --900: 106,
101 ),
102
103 --colors: (
104 --100: math.div(0, 12) * 96 + 5,
105 --200: math.div(1, 12) * 96 + 5,
106 --300: math.div(2, 12) * 96 + 5,
107 --400: math.div(3, 12) * 96 + 5,
108 --500: math.div(4, 12) * 96 + 5,
109 --600: math.div(5, 12) * 96 + 5,
110 --700: math.div(6, 12) * 96 + 5,
111 --800: math.div(7, 12) * 96 + 5,
112 --900: math.div(8, 12) * 96 + 5,
113 --1000: math.div(9, 12) * 96 + 5,
114 --1100: math.div(10, 12) * 96 + 5,
115 --1200: math.div(11, 12) * 96 + 5,
116 --1300: math.div(12, 12) * 96 + 5,
117 ),
118 ),
119
120 --ranges: (
121 --full: .3,
122 --muted: .1,
123 ),
124
125 --palettes: (
126 --base: hsl(260, 90%, 98%) --grays --full,
127 --blue: oklch(56% .16 275.25) --colors --muted,
128 --purple: oklch(56% .16 305.58) --colors --muted,
129 --red: oklch(56% .16 14.69) --colors --muted,
130 --green: oklch(56% .16 150.48) --colors --muted,
131 --yellow: oklch(56% .16 84.08) --colors --muted,
132 ),
133
134 --semantic: map.merge($semantic-colors-common, (
135 --bg-l2: --theme --base --50,
136 --bg-l1: --theme --base --100,
137 --bg-base: --theme --base --200,
138 )),
139
140 --constants: (
141 --shadow: rgba(#000, .15),
142 ),
143), $theme-light-override) !default;
144
145$theme-dark-override: () !default;
146$theme-dark: map.deep-merge((
147 --contrasts: (
148 --grays: (
149 --50: 4.4,
150 --75: 2.2,
151 --100: 0,
152
153 --200: easing.cubic-bezier(.3, .1, .8, .8, math.div(1, 8)) * -108,
154 --300: easing.cubic-bezier(.3, .1, .8, .8, math.div(2, 8)) * -108,
155 --400: easing.cubic-bezier(.3, .1, .8, .8, math.div(3, 8)) * -108,
156
157 --500: easing.cubic-bezier(.3, .1, .8, .8, math.div(4, 8)) * -108,
158 --600: easing.cubic-bezier(.3, .1, .8, .8, math.div(5, 8)) * -108,
159 --700: easing.cubic-bezier(.3, .1, .8, .8, math.div(6, 8)) * -108,
160 --800: easing.cubic-bezier(.3, .1, .8, .8, math.div(7, 8)) * -108,
161 --900: easing.cubic-bezier(.3, .1, .8, .8, math.div(8, 8)) * -108,
162 ),
163
164 --colors: (
165 --100: math.div(0, 12) * -100 - 5,
166 --200: math.div(1, 12) * -100 - 5,
167 --300: math.div(2, 12) * -100 - 5,
168 --400: math.div(3, 12) * -100 - 5,
169 --500: math.div(4, 12) * -100 - 5,
170 --600: math.div(5, 12) * -100 - 5,
171 --700: math.div(6, 12) * -100 - 5,
172 --800: math.div(7, 12) * -100 - 5,
173 --900: math.div(8, 12) * -100 - 5,
174 --1000: math.div(9, 12) * -100 - 5,
175 --1100: math.div(10, 12) * -100 - 5,
176 --1200: math.div(11, 12) * -100 - 5,
177 --1300: math.div(12, 12) * -100 - 5,
178 ),
179 ),
180
181 --ranges: (
182 --full: 1,
183 --muted: .3,
184 ),
185
186 --palettes: (
187 --base: hsl(257, 7%, 19%) --grays --full,
188 --blue: oklch(56% .16 275.25) --colors --muted,
189 --purple: oklch(56% .16 305.58) --colors --muted,
190 --red: oklch(56% .16 14.69) --colors --muted,
191 --green: oklch(56% .16 150.48) --colors --muted,
192 --yellow: oklch(56% .16 84.08) --colors --muted,
193 ),
194
195 --semantic: map.merge($semantic-colors-common, (
196 --bg-base: --theme --base --50,
197 --bg-l1: --theme --base --75,
198 --bg-l2: --theme --base --100,
199 )),
200
201 --constants: (
202 --shadow: rgba(#000, .5),
203 ),
204), $theme-dark-override) !default;
205
206$themes-override: () !default;
207$themes: map.deep-merge((
208 main: (
209 light: $theme-light,
210 dark: $theme-dark,
211 )
212), $themes-override) !default;
213
214$theme-default: list.nth(map.keys($themes), 1) !default;