@stackoverflow/stacks 1.0.0-beta.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +47 -47
  2. package/dist/controllers/s-popover.d.ts +11 -2
  3. package/dist/css/stacks.css +214 -3
  4. package/dist/css/stacks.min.css +1 -1
  5. package/dist/js/stacks.js +18 -2
  6. package/dist/js/stacks.min.js +1 -1
  7. package/lib/css/atomic/borders.less +378 -378
  8. package/lib/css/atomic/colors.less +209 -209
  9. package/lib/css/atomic/flex.less +375 -375
  10. package/lib/css/atomic/grid.less +174 -174
  11. package/lib/css/atomic/misc.less +343 -343
  12. package/lib/css/atomic/spacing.less +342 -314
  13. package/lib/css/atomic/typography.less +273 -273
  14. package/lib/css/atomic/width-height.less +194 -194
  15. package/lib/css/base/body.less +44 -44
  16. package/lib/css/base/configuration-static.less +61 -61
  17. package/lib/css/base/icons.less +20 -20
  18. package/lib/css/base/internals.less +220 -220
  19. package/lib/css/base/reset-meyer.less +64 -64
  20. package/lib/css/base/reset-normalize.less +449 -449
  21. package/lib/css/base/reset.less +20 -20
  22. package/lib/css/components/activity-indicator.less +44 -45
  23. package/lib/css/components/avatars.less +189 -189
  24. package/lib/css/components/badges.less +209 -209
  25. package/lib/css/components/banners.less +80 -80
  26. package/lib/css/components/blank-states.less +26 -26
  27. package/lib/css/components/breadcrumbs.less +44 -44
  28. package/lib/css/components/button-groups.less +104 -104
  29. package/lib/css/components/buttons.less +665 -665
  30. package/lib/css/components/cards.less +44 -44
  31. package/lib/css/components/code-blocks.less +130 -130
  32. package/lib/css/components/collapsible.less +104 -104
  33. package/lib/css/components/inputs.less +728 -728
  34. package/lib/css/components/link-previews.less +136 -136
  35. package/lib/css/components/links.less +218 -218
  36. package/lib/css/components/menu.less +47 -47
  37. package/lib/css/components/modals.less +133 -133
  38. package/lib/css/components/navigation.less +146 -146
  39. package/lib/css/components/notices.less +233 -233
  40. package/lib/css/components/page-titles.less +60 -60
  41. package/lib/css/components/pagination.less +55 -55
  42. package/lib/css/components/popovers.less +197 -197
  43. package/lib/css/components/post-summary.less +425 -425
  44. package/lib/css/components/progress-bars.less +330 -330
  45. package/lib/css/components/prose.less +503 -503
  46. package/lib/css/components/spinner.less +107 -107
  47. package/lib/css/components/tables.less +341 -341
  48. package/lib/css/components/tags.less +236 -236
  49. package/lib/css/components/toggle-switches.less +144 -144
  50. package/lib/css/components/topbar.less +427 -427
  51. package/lib/css/components/uploader.less +210 -210
  52. package/lib/css/components/user-cards.less +169 -169
  53. package/lib/css/components/widget-dynamic.less +33 -33
  54. package/lib/css/components/widget-static.less +273 -273
  55. package/lib/css/exports/constants-colors.less +1092 -1092
  56. package/lib/css/exports/constants-helpers.less +108 -108
  57. package/lib/css/exports/constants-type.less +153 -153
  58. package/lib/css/exports/exports.less +15 -15
  59. package/lib/css/exports/mixins.less +237 -237
  60. package/lib/css/stacks-dynamic.less +35 -35
  61. package/lib/css/stacks-static.less +86 -86
  62. package/lib/css/stacks.less +13 -13
  63. package/lib/ts/controllers/index.ts +7 -7
  64. package/lib/ts/controllers/s-expandable-control.ts +188 -188
  65. package/lib/ts/controllers/s-modal.ts +321 -321
  66. package/lib/ts/controllers/s-navigation-tablist.ts +117 -117
  67. package/lib/ts/controllers/s-popover.ts +567 -547
  68. package/lib/ts/controllers/s-table.ts +220 -220
  69. package/lib/ts/controllers/s-tooltip.ts +246 -246
  70. package/lib/ts/controllers/s-uploader.ts +172 -172
  71. package/lib/ts/index.ts +20 -20
  72. package/lib/ts/stacks.ts +88 -88
  73. package/lib/tsconfig.json +13 -13
  74. package/package.json +86 -87
@@ -1,1092 +1,1092 @@
1
- @import (reference) "./mixins.less";
2
-
3
- //
4
- // STACK OVERFLOW
5
- // CONSTANTS -- COLORS
6
- //
7
- // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
8
- // Stack Overflow. For documentation of all these classes and how to contribute,
9
- // visit https://stackoverflow.design/
10
- //
11
- // ============================================================================
12
- // $ Legacy Less color variables
13
- // ----------------------------------------------------------------------------
14
- // -- Base Hue Values
15
- @white-h: 0;
16
- @black-h: 210;
17
- @orange-h: 27;
18
- @yellow-h: 47;
19
- @green-h: 140;
20
- @blue-h: 206;
21
- @powder-h: 205;
22
- @red-h: 358;
23
- @fog-h: 180;
24
- @gold-h: 48;
25
- @silver-h: 210;
26
- @bronze-h: 28;
27
-
28
- // -- Base Saturation Values
29
- @black-s: 8%;
30
-
31
- // -- Primary Colors
32
- @white: hsl(@white-h, 0%, 100%);
33
- @black: hsl(@black-h, @black-s, 5%);
34
- @orange: hsl(@orange-h, 90%, 55%);
35
-
36
- // -- Accent Colors
37
- @yellow: hsl(@yellow-h, 83%, 91%);
38
- @green: hsl(@green-h, 40%, 55%);
39
- @blue: hsl(@blue-h, 100%, 40%);
40
- @powder: hsl(@powder-h, 46%, 92%);
41
- @red: hsl(@red-h, 62%, 52%);
42
- @fog: hsl(@fog-h, 7%, 97%);
43
-
44
- // Black
45
- @black-025: hsl(@black-h, @black-s, 97.5%);
46
- @black-050: hsl(@black-h, @black-s, 95%);
47
- @black-075: hsl(@black-h, @black-s, 90%);
48
- @black-100: hsl(@black-h, @black-s, 85%);
49
- @black-150: hsl(@black-h, @black-s, 80%);
50
- @black-200: hsl(@black-h, @black-s, 75%);
51
- @black-300: hsl(@black-h, @black-s, 65%);
52
- @black-350: hsl(@black-h, @black-s, 60%);
53
- @black-400: hsl(@black-h, @black-s, 55%);
54
- @black-500: hsl(@black-h, @black-s, 45%);
55
- @black-600: hsl(@black-h, @black-s, 35%);
56
- @black-700: hsl(@black-h, @black-s, 25%);
57
- @black-750: hsl(@black-h, @black-s, 20%);
58
- @black-800: hsl(@black-h, @black-s, 15%);
59
- @black-900: @black;
60
-
61
- // Orange
62
- @orange-050: hsl(@orange-h, 100%, 97%);
63
- @orange-100: hsl(@orange-h, 95%, 90%);
64
- @orange-200: hsl(@orange-h, 90%, 83%);
65
- @orange-300: hsl(@orange-h, 90%, 70%);
66
- @orange-400: @orange;
67
- @orange-500: hsl(@orange-h, 90%, 50%);
68
- @orange-600: hsl(@orange-h, 90%, 45%);
69
- @orange-700: hsl(@orange-h, 90%, 39%);
70
- @orange-800: hsl(@orange-h, 87%, 35%);
71
- @orange-900: hsl(@orange-h, 80%, 30%);
72
-
73
- // Blue
74
- @blue-050: hsl(@blue-h, 100%, 97%);
75
- @blue-100: hsl(@blue-h, 96%, 90%);
76
- @blue-200: hsl(@blue-h, 93%, 83.5%);
77
- @blue-300: hsl(@blue-h, 90%, 69.5%);
78
- @blue-400: hsl(@blue-h, 85%, 57.5%);
79
- @blue-500: hsl(@blue-h, 100%, 52%);
80
- @blue-600: @blue;
81
- @blue-700: hsl(@blue-h + 3, 100%, 37.5%);
82
- @blue-800: hsl(@blue-h + 3, 100%, 32%);
83
- @blue-900: hsl(@blue-h + 3, 100%, 26%);
84
-
85
- // Powder
86
- @powder-050: hsl(@powder-h, 47%, 97%);
87
- @powder-100: @powder;
88
- @powder-200: hsl(@powder-h, 53%, 88%);
89
- @powder-300: hsl(@powder-h, 57%, 81%);
90
- @powder-400: hsl(@powder-h, 56%, 76%);
91
- @powder-500: hsl(@powder-h, 41%, 63%);
92
- @powder-600: hsl(@powder-h, 36%, 53%);
93
- @powder-700: hsl(@powder-h, 47%, 42%);
94
- @powder-800: hsl(@powder-h, 46%, 32%);
95
- @powder-900: hsl(@powder-h, 46%, 22%);
96
-
97
- // Green
98
- @green-025: hsl(@green-h, 42%, 95%);
99
- @green-050: hsl(@green-h, 40%, 90%);
100
- @green-100: hsl(@green-h, 40%, 85%);
101
- @green-200: hsl(@green-h, 40%, 75%);
102
- @green-300: hsl(@green-h, 40%, 65%);
103
- @green-400: @green;
104
- @green-500: hsl(@green-h, 40%, 47%);
105
- @green-600: hsl(@green-h, 40%, 40%);
106
- @green-700: hsl(@green-h, 41%, 31%);
107
- @green-800: hsl(@green-h, 40%, 27%);
108
- @green-900: hsl(@green-h, 40%, 20%);
109
-
110
- // Yellow
111
- @yellow-050: hsl(@yellow-h, 87%, 94%);
112
- @yellow-100: @yellow;
113
- @yellow-200: hsl(@yellow-h, 65%, 84%);
114
- @yellow-300: hsl(@yellow-h, 69%, 69%);
115
- @yellow-400: hsl(@yellow-h, 79%, 58%);
116
- @yellow-500: hsl(@yellow-h, 73%, 50%);
117
- @yellow-600: hsl(@yellow-h, 76%, 46%);
118
- @yellow-700: hsl(@yellow-h, 79%, 40%);
119
- @yellow-800: hsl(@yellow-h, 82%, 34%);
120
- @yellow-900: hsl(@yellow-h, 84%, 28%);
121
-
122
- // Red
123
- @red-050: hsl(@red-h, 75%, 97%);
124
- @red-100: hsl(@red-h, 76%, 90%);
125
- @red-200: hsl(@red-h, 74%, 83%);
126
- @red-300: hsl(@red-h, 70%, 70%);
127
- @red-400: hsl(@red-h, 68%, 59%);
128
- @red-500: @red;
129
- @red-600: hsl(@red-h, 62%, 47%);
130
- @red-700: hsl(@red-h, 64%, 41%);
131
- @red-800: hsl(@red-h, 64%, 35%);
132
- @red-900: hsl(@red-h, 67%, 29%);
133
-
134
- // $ BADGES
135
- // ----------------------------------------------------------------------------
136
- @gold: hsl(@gold-h, 100%, 50%);
137
- @gold-lighter: hsl(@gold-h, 100%, 91%);
138
- @gold-darker: hsl(@gold-h - 3, 100%, 47%);
139
-
140
- @silver: hsl(@silver-h, 6%, 72%);
141
- @silver-lighter: hsl(@silver-h, 0%, 91%);
142
- @silver-darker: hsl(@silver-h, 3%, 61%);
143
-
144
- @bronze: hsl(@bronze-h, 38%, 67%);
145
- @bronze-lighter: hsl(@bronze-h, 40%, 92%);
146
- @bronze-darker: hsl(@bronze-h, 31%, 52%);
147
-
148
- // $ SCROLLBARS
149
- // ----------------------------------------------------------------------------
150
- @scrollbar: hsla(0, 0%, 0%, 0.2);
151
-
152
- // ============================================================================
153
- // $ CSS Variable Colors
154
- // ----------------------------------------------------------------------------
155
-
156
- .generate-calculated-themed-variables(@primary, @designation: primary, @theme: base) {
157
- // Split into h/s/l/a values
158
- --theme-@{theme}-@{designation}-color-h: hue(@primary);
159
- --theme-@{theme}-@{designation}-color-s: saturation(@primary);
160
- --theme-@{theme}-@{designation}-color-l: lightness(@primary);
161
-
162
- // Split into r/g/b values
163
- --theme-@{theme}-@{designation}-color-r: red(@primary);
164
- --theme-@{theme}-@{designation}-color-g: green(@primary);
165
- --theme-@{theme}-@{designation}-color-b: blue(@primary);
166
- }
167
-
168
- .generate-themed-variables(@theme: theme) {
169
- // Primary color
170
- // Split into h/s/l/a values
171
- --theme-primary-color-h: var(~"--@{theme}-primary-color-h", var(--theme-base-primary-color-h));
172
- --theme-primary-color-s: var(~"--@{theme}-primary-color-s", var(--theme-base-primary-color-s));
173
- --theme-primary-color-l: var(~"--@{theme}-primary-color-l", var(--theme-base-primary-color-l));
174
-
175
- // Split into r/g/b values
176
- --theme-primary-color-r: var(~"--@{theme}-primary-color-r", var(--theme-base-primary-color-r));
177
- --theme-primary-color-g: var(~"--@{theme}-primary-color-g", var(--theme-base-primary-color-g));
178
- --theme-primary-color-b: var(~"--@{theme}-primary-color-b", var(--theme-base-primary-color-b));
179
-
180
- // Secondary color
181
- // Split into h/s/l/a values
182
- --theme-secondary-color-h: var(~"--@{theme}-secondary-color-h", var(--theme-base-secondary-color-h));
183
- --theme-secondary-color-s: var(~"--@{theme}-secondary-color-s", var(--theme-base-secondary-color-s));
184
- --theme-secondary-color-l: var(~"--@{theme}-secondary-color-l", var(--theme-base-secondary-color-l));
185
-
186
- // Split into r/g/b values
187
- --theme-secondary-color-r: var(~"--@{theme}-secondary-color-r", var(--theme-base-secondary-color-r));
188
- --theme-secondary-color-g: var(~"--@{theme}-secondary-color-g", var(--theme-base-secondary-color-g));
189
- --theme-secondary-color-b: var(~"--@{theme}-secondary-color-b", var(--theme-base-secondary-color-b));
190
- }
191
-
192
- .component-colors {
193
- --theme-body-font-color: var(--black-800);
194
- --theme-background-color: var(--white);
195
- // Links
196
- --theme-link-color: var(--theme-secondary-400);
197
- --theme-link-color-hover: var(--theme-secondary-350);
198
- --theme-link-color-visited: var(--theme-secondary-500);
199
-
200
- // Button Default (Secondary)
201
- --theme-button-color: var(--theme-secondary-400);
202
- --theme-button-background-color: transparent;
203
- --theme-button-hover-color: var(--theme-secondary-500);
204
- --theme-button-hover-background-color: var(--theme-secondary-050);
205
- --theme-button-active-background-color: var(--theme-secondary-100);
206
- --theme-button-selected-color: var(--theme-secondary-900);
207
- --theme-button-selected-background-color: var(--theme-secondary-150);
208
-
209
- // Button Primary
210
- --theme-button-primary-color: var(--white);
211
- --theme-button-primary-background-color: var(--theme-secondary-400);
212
- --theme-button-primary-hover-color: var(--white);
213
- --theme-button-primary-hover-background-color: var(--theme-secondary-500);
214
- --theme-button-primary-active-background-color: var(--theme-secondary-700);
215
- --theme-button-primary-selected-color: var(--white);
216
- --theme-button-primary-selected-background-color: var(--theme-secondary-700);
217
- --theme-button-primary-number-color: var(--theme-secondary-900);
218
-
219
- // Button Filled
220
- --theme-button-filled-color: var(--theme-secondary-700);
221
- --theme-button-filled-background-color: var(--theme-secondary-050);
222
- --theme-button-filled-border-color: var(--theme-secondary-350);
223
- --theme-button-filled-hover-color: var(--theme-secondary-800);
224
- --theme-button-filled-hover-background-color: var(--theme-secondary-100);
225
- --theme-button-filled-active-background-color: var(--theme-secondary-150);
226
- --theme-button-filled-active-border-color: var(--theme-secondary-350);
227
- --theme-button-filled-selected-color: var(--theme-secondary-900);
228
- --theme-button-filled-selected-background-color: var(--theme-secondary-300);
229
- --theme-button-filled-selected-border-color: var(--theme-secondary-500);
230
-
231
- // Button Outline
232
- --theme-button-outlined-border-color: var(--theme-secondary-300);
233
- --theme-button-outlined-selected-border-color: var(--theme-secondary-400);
234
-
235
- // Tags
236
- --theme-tag-color: var(--theme-secondary-800);
237
- --theme-tag-background-color: var(--theme-secondary-075);
238
- --theme-tag-border-color: transparent;
239
- --theme-tag-hover-color: var(--theme-secondary-900);
240
- --theme-tag-hover-background-color: var(--theme-secondary-100);
241
- --theme-tag-hover-border-color: transparent;
242
-
243
- // Topbar
244
- --theme-topbar-height: var(--su-static48);
245
- --theme-topbar-background-color: var(--black-025);
246
-
247
- // Topbar Search input
248
- --theme-topbar-search-color: var(--black-700);
249
- --theme-topbar-search-background: var(--white);
250
- --theme-topbar-search-placeholder: var(--black-200);
251
- --theme-topbar-search-border: var(--black-200);
252
- --theme-topbar-search-border-focus: var(--blue-300);
253
- --theme-topbar-search-shadow-focus: 0 0 0 var(--su-static4) var(--focus-ring);
254
-
255
- // Topbar Search switcher
256
- --theme-topbar-select-color: var(--black-700);
257
- --theme-topbar-select-background: var(--black-075);
258
-
259
- // Topbar items
260
- --theme-topbar-item-color: var(--black-600);
261
- --theme-topbar-item-color-hover: var(--black-800);
262
- --theme-topbar-item-background-hover: var(--black-075);
263
- --theme-topbar-item-color-current: var(--black);
264
- --theme-topbar-item-border-current: var(--theme-primary-color);
265
-
266
- // Topbar themed border accent
267
- --theme-topbar-accent-border: 3px solid var(--theme-primary-color);
268
-
269
- // Post summary
270
- --theme-post-title-color: var(--theme-link-color);
271
- --theme-post-title-color-hover: var(--theme-link-color-hover);
272
- --theme-post-title-color-visited: var(--theme-link-color-visited);
273
- --theme-post-title-font-family: var(--theme-body-font-family);
274
- --theme-post-body-font-family: var(--theme-body-font-family);
275
- }
276
-
277
- // -- Light mode
278
- .light-colors() {
279
- --white: @white;
280
- --black: @black;
281
- --orange: @orange;
282
- --yellow: @yellow;
283
- --green: @green;
284
- --blue: @blue;
285
- --powder: @powder;
286
- --red: @red;
287
-
288
- // Black
289
- --black-025: @black-025;
290
- --black-050: @black-050;
291
- --black-075: @black-075;
292
- --black-100: @black-100;
293
- --black-150: @black-150;
294
- --black-200: @black-200;
295
- --black-300: @black-300;
296
- --black-350: @black-350;
297
- --black-400: @black-400;
298
- --black-500: @black-500;
299
- --black-600: @black-600;
300
- --black-700: @black-700;
301
- --black-750: @black-750;
302
- --black-800: @black-800;
303
- --black-900: @black-900;
304
-
305
- // Orange
306
- --orange-050: @orange-050;
307
- --orange-100: @orange-100;
308
- --orange-200: @orange-200;
309
- --orange-300: @orange-300;
310
- --orange-400: @orange-400;
311
- --orange-500: @orange-500;
312
- --orange-600: @orange-600;
313
- --orange-700: @orange-700;
314
- --orange-800: @orange-800;
315
- --orange-900: @orange-900;
316
-
317
- // Blue
318
- --blue-050: @blue-050;
319
- --blue-100: @blue-100;
320
- --blue-200: @blue-200;
321
- --blue-300: @blue-300;
322
- --blue-400: @blue-400;
323
- --blue-500: @blue-500;
324
- --blue-600: @blue-600;
325
- --blue-700: @blue-700;
326
- --blue-800: @blue-800;
327
- --blue-900: @blue-900;
328
-
329
- // Powder
330
- --powder-050: @powder-050;
331
- --powder-100: @powder-100;
332
- --powder-200: @powder-200;
333
- --powder-300: @powder-300;
334
- --powder-400: @powder-400;
335
- --powder-500: @powder-500;
336
- --powder-600: @powder-600;
337
- --powder-700: @powder-700;
338
- --powder-800: @powder-800;
339
- --powder-900: @powder-900;
340
-
341
- // Green
342
- --green-025: @green-025;
343
- --green-050: @green-050;
344
- --green-100: @green-100;
345
- --green-200: @green-200;
346
- --green-300: @green-300;
347
- --green-400: @green-400;
348
- --green-500: @green-500;
349
- --green-600: @green-600;
350
- --green-700: @green-700;
351
- --green-800: @green-800;
352
- --green-900: @green-900;
353
-
354
- // Yellow
355
- --yellow-050: @yellow-050;
356
- --yellow-100: @yellow-100;
357
- --yellow-200: @yellow-200;
358
- --yellow-300: @yellow-300;
359
- --yellow-400: @yellow-400;
360
- --yellow-500: @yellow-500;
361
- --yellow-600: @yellow-600;
362
- --yellow-700: @yellow-700;
363
- --yellow-800: @yellow-800;
364
- --yellow-900: @yellow-900;
365
-
366
- // Red
367
- --red-050: @red-050;
368
- --red-100: @red-100;
369
- --red-200: @red-200;
370
- --red-300: @red-300;
371
- --red-400: @red-400;
372
- --red-500: @red-500;
373
- --red-600: @red-600;
374
- --red-700: @red-700;
375
- --red-800: @red-800;
376
- --red-900: @red-900;
377
-
378
- // Gold
379
- --gold: @gold;
380
- --gold-lighter: @gold-lighter;
381
- --gold-darker: @gold-darker;
382
-
383
- // Silver
384
- --silver: @silver;
385
- --silver-lighter: @silver-lighter;
386
- --silver-darker: @silver-darker;
387
-
388
- // Bronze
389
- --bronze: @bronze;
390
- --bronze-lighter: @bronze-lighter;
391
- --bronze-darker: @bronze-darker;
392
-
393
- // Border colors
394
- --bc-lightest: var(--black-025);
395
- --bc-lighter: var(--black-050);
396
- --bc-light: var(--black-075);
397
- --bc-medium: var(--black-100);
398
- --bc-dark: var(--black-150);
399
- --bc-darker: var(--black-200);
400
-
401
- // Font colors
402
- --fc-dark: @black-900;
403
- --fc-medium: @black-700;
404
- --fc-light: @black-500;
405
-
406
- // Focus rings
407
- --focus-ring-success: hsla(@green-h, 40%, 75%, 40%);
408
- --focus-ring-warning: hsla(@yellow-h, 79%, 58%, 40%);
409
- --focus-ring-error: hsla(@red-h, 62%, 47%, 15%);
410
- --focus-ring-muted: hsla(@black-h, @black-s, 15%, 10%);
411
-
412
- // Shadows
413
- --bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.05), 0 2px 8px hsla(0, 0%, 0%, 0.05);
414
- --bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.06), 0 2px 6px hsla(0, 0%, 0%, 0.06), 0 3px 8px hsla(0, 0%, 0%, 0.09);
415
- --bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.09), 0 3px 8px hsla(0, 0%, 0%, 0.09), 0 4px 13px hsla(0, 0%, 0%, 0.13);
416
- --bs-xl: 0 10px 24px hsla(0, 0%, 0%, 0.05), 0 20px 48px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.1);
417
-
418
- // Scrollbars
419
- --scrollbar: hsla(0, 0, 0, 0.2);
420
-
421
- // Syntax highlighting
422
- --highlight-bg: hsl(0, 0%, 96.5%); // Between black-025 and black-050
423
- --highlight-color: var(--black-750); // AAA 11.78
424
- --highlight-comment: hsl(@black-h, 8%, 43.5%); // ~black-500 AA 4.80
425
- --highlight-punctuation: var(--black-600); // AA 6.48
426
- --highlight-namespace: hsl(@orange-h, 99%, 36%); // Custom orange AA 4.51
427
- --highlight-attribute: hsl(@blue-h, 98.5%, 29%); // Custom blue AAA 7.25
428
- --highlight-literal: hsl(@orange-h, 99%, 36%); // Custom orange AA 4.51
429
- --highlight-symbol: hsl(306, 43%, 35%); // Custom purple AAA 7.30
430
- --highlight-keyword: hsl(@blue-h, 98.5%, 29%); // Custom blue AAA 7.07
431
- --highlight-variable: hsl(80, 80.5%, 26.5%); // Custom green AAA 7.25
432
- --highlight-addition: var(--green-700); // AA 5.59
433
- --highlight-deletion: var(--red-600); // AA 5.31
434
- }
435
-
436
- .light-themed-colors() {
437
- // Reassemble as a single hsl value
438
- --theme-primary-color: .assemble-color(theme-primary-color)[];
439
-
440
- // Steps
441
- --theme-primary-900: .native-darken(theme-primary-color, 26)[];
442
- --theme-primary-800: .native-darken(theme-primary-color, 21)[];
443
- --theme-primary-700: .native-darken(theme-primary-color, 16)[];
444
- --theme-primary-600: .native-darken(theme-primary-color, 10)[];
445
- --theme-primary-500: .native-darken(theme-primary-color, 5)[];
446
- --theme-primary-400: var(--theme-primary-color);
447
- --theme-primary-350: .native-tint(theme-primary-color, 20)[];
448
- --theme-primary-300: .native-tint(theme-primary-color, 35)[];
449
- --theme-primary-200: .native-tint(theme-primary-color, 48)[];
450
- --theme-primary-150: .native-tint(theme-primary-color, 65)[];
451
- --theme-primary-100: .native-tint(theme-primary-color, 78)[];
452
- --theme-primary-075: .native-tint(theme-primary-color, 85)[];
453
- --theme-primary-050: .native-tint(theme-primary-color, 92)[];
454
- --theme-primary-025: .native-tint(theme-primary-color, 96)[];
455
-
456
- // Reassemble as a single hsl value
457
- --theme-secondary-color: .assemble-color(theme-secondary-color)[];
458
-
459
- // Steps
460
- --theme-secondary-900: .native-darken(theme-secondary-color, 26)[];
461
- --theme-secondary-800: .native-darken(theme-secondary-color, 21)[];
462
- --theme-secondary-700: .native-darken(theme-secondary-color, 16)[];
463
- --theme-secondary-600: .native-darken(theme-secondary-color, 10)[];
464
- --theme-secondary-500: .native-darken(theme-secondary-color, 5)[];
465
- --theme-secondary-400: var(--theme-secondary-color);
466
- --theme-secondary-350: .native-tint(theme-secondary-color, 20)[];
467
- --theme-secondary-300: .native-tint(theme-secondary-color, 35)[];
468
- --theme-secondary-200: .native-tint(theme-secondary-color, 48)[];
469
- --theme-secondary-150: .native-tint(theme-secondary-color, 65)[];
470
- --theme-secondary-100: .native-tint(theme-secondary-color, 78)[];
471
- --theme-secondary-075: .native-tint(theme-secondary-color, 85)[];
472
- --theme-secondary-050: .native-tint(theme-secondary-color, 92)[];
473
- --theme-secondary-025: .native-tint(theme-secondary-color, 96)[];
474
-
475
- // Fades
476
- --focus-ring: .native-fade(theme-secondary-color, 15)[];
477
- }
478
-
479
- // -- Dark mode
480
- .dark-colors() {
481
- --white: hsl(@black-h, 0%, 17.5%);
482
- --black: @white;
483
-
484
- // Black
485
- --black-025: hsl(@black-h, 0%, 22.5%);
486
- --black-050: hsl(@black-h, 0%, 24%);
487
- --black-075: hsl(@black-h, 4%, 26%);
488
- --black-100: hsl(@black-h, 4.5%, 30.5%);
489
- --black-150: hsl(@black-h, 5%, 35%);
490
- --black-200: hsl(@black-h, 5.5%, 43.5%);
491
- --black-300: hsl(@black-h, 6.5%, 52%);
492
- --black-350: hsl(@black-h, 7%, 61%);
493
- --black-400: hsl(@black-h, 8%, 65%);
494
- --black-500: hsl(@black-h, 8%, 70%);
495
- --black-600: hsl(@black-h, 7%, 78.5%);
496
- --black-700: hsl(@black-h, 8%, 82.5%);
497
- --black-750: hsl(@black-h, 9%, 86.5%);
498
- --black-800: hsl(@black-h, 9%, 91.5%);
499
- --black-900: hsl(@black-h, 4%, 95%);
500
-
501
- // Orange
502
- --orange-050: hsl(@orange-h, 16.5%, 23.9%);
503
- --orange-100: hsl(@orange-h, 30%, 28.4%);
504
- --orange-200: hsl(@orange-h, 50%, 36.9%);
505
- --orange-300: hsl(@orange-h, 70%, 47.3%);
506
- --orange-400: hsl(@orange-h, 90.5%, 54.9%);
507
- --orange-500: hsl(@orange-h, 100%, 59%);
508
- --orange-600: hsl(@orange-h, 100%, 68.4%);
509
- --orange-700: hsl(@orange-h, 89.5%, 74.1%);
510
- --orange-800: hsl(@orange-h, 92%, 85.7%);
511
- --orange-900: hsl(@orange-h, 95%, 91.8%);
512
-
513
- // Blue
514
- --blue-050: hsl(@blue-h, 40%, 23%);
515
- --blue-100: hsl(@blue-h, 44%, 26%);
516
- --blue-200: hsl(@blue-h, 46%, 30%);
517
- --blue-300: hsl(@blue-h, 53%, 35%);
518
- --blue-400: hsl(@blue-h + 3, 56%, 43%);
519
- --blue-500: hsl(@blue-h, 64%, 51%);
520
- --blue-600: hsl(@blue-h, 100%, 60%);
521
- --blue-700: hsl(@blue-h, 90%, 74%);
522
- --blue-800: hsl(@blue-h, 95%, 86%);
523
- --blue-900: hsl(@blue-h, 91%, 91.5%);
524
-
525
- // Powder
526
- --powder-050: hsl(@powder-h, 5%, 27%);
527
- --powder-100: hsl(@powder-h, 14%, 28%);
528
- --powder-200: hsl(@powder-h, 17.5%, 32%);
529
- --powder-300: hsl(@powder-h, 19.5%, 37%);
530
- --powder-400: hsl(@powder-h, 22.5%, 44%);
531
- --powder-500: hsl(@powder-h, 29%, 54%);
532
- --powder-600: hsl(@powder-h, 50%, 65.5%);
533
- --powder-700: hsl(@powder-h, 46.5%, 73.5%);
534
- --powder-800: hsl(@powder-h, 49.5%, 87%);
535
- --powder-900: hsl(@powder-h, 100%, 95%);
536
-
537
- // Green
538
- --green-025: hsl(@green-h, 18%, 22%);
539
- --green-050: hsl(@green-h, 18%, 25%);
540
- --green-100: hsl(@green-h, 22.5%, 31%);
541
- --green-200: hsl(@green-h, 23.5%, 37%);
542
- --green-300: hsl(@green-h, 25%, 40.5%);
543
- --green-400: hsl(@green-h, 27.5%, 48.5%);
544
- --green-500: hsl(@green-h, 35%, 54.5%);
545
- --green-600: hsl(@green-h, 40%, 61.5%);
546
- --green-700: hsl(@green-h, 39.5%, 69.5%);
547
- --green-800: hsl(@green-h, 39.5%, 78.5%);
548
- --green-900: hsl(@green-h, 38%, 86.5%);
549
-
550
- // Yellow
551
- --yellow-050: hsl(@yellow-h, 13%, 24.5%);
552
- --yellow-100: hsl(@yellow-h, 19%, 27%);
553
- --yellow-200: hsl(@yellow-h, 30.5%, 31%);
554
- --yellow-300: hsl(@yellow-h, 37%, 36%);
555
- --yellow-400: hsl(@yellow-h, 45.5%, 42.5%);
556
- --yellow-500: hsl(@yellow-h, 55.5%, 48%);
557
- --yellow-600: hsl(@yellow-h, 67.5%, 55.5%);
558
- --yellow-700: hsl(@yellow-h, 84.5%, 64%);
559
- --yellow-800: hsl(@yellow-h, 90%, 72.5%);
560
- --yellow-900: hsl(@yellow-h, 93%, 83.5%);
561
-
562
- // Red
563
- --red-050: hsl(@red-h + 3, 30%, 26.5%);
564
- --red-100: hsl(@red-h + 3, 35%, 33%);
565
- --red-200: hsl(@red-h + 3, 37%, 38.5%);
566
- --red-300: hsl(@red-h + 3, 39%, 43.5%);
567
- --red-400: hsl(@red-h + 3, 42%, 49%);
568
- --red-500: hsl(@red-h + 3, 50%, 54%);
569
- --red-600: hsl(@red-h + 3, 56.5%, 59.5%);
570
- --red-700: hsl(@red-h + 3, 62.5%, 65.5%);
571
- --red-800: hsl(@red-h + 3, 64%, 74%);
572
- --red-900: hsl(@red-h + 3, 65.5%, 85.5%);
573
-
574
- // Gold
575
- --gold: @gold;
576
- --gold-lighter: hsl(@gold-h, 22%, 30%);
577
- --gold-darker: @gold-darker;
578
-
579
- // Silver
580
- --silver: @silver;
581
- --silver-lighter: hsl(@silver-h, 0%, 26%);
582
- --silver-darker: @silver-darker;
583
-
584
- // Bronze
585
- --bronze: @bronze;
586
- --bronze-lighter: hsl(@bronze-h, 13%, 27%);
587
- --bronze-darker: @bronze-darker;
588
-
589
- // Border colors
590
- --bc-lightest: var(--black-025);
591
- --bc-lighter: var(--black-050);
592
- --bc-light: var(--black-075);
593
- --bc-medium: var(--black-100);
594
- --bc-dark: var(--black-150);
595
- --bc-darker: var(--black-200);
596
-
597
- // Font colors
598
- --fc-dark: var(--black-900);
599
- --fc-medium: var(--black-700);
600
- --fc-light: var(--black-500);
601
-
602
- // Focus rings
603
- --focus-ring-success: hsla(@green-h, 40%, 75%, 40%);
604
- --focus-ring-warning: hsla(@yellow-h, 79%, 58%, 40%);
605
- --focus-ring-error: hsla(@red-h, 62%, 52%, 30%);
606
- --focus-ring-muted: hsla(@black-h, @black-s, 100%, 10%);
607
-
608
- // Shadows
609
- --bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.1), 0 1px 4px hsla(0, 0%, 0%, 0.1), 0 2px 8px hsla(0, 0%, 0%, 0.1);
610
- --bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.11), 0 2px 6px hsla(0, 0%, 0%, 0.11), 0 3px 8px hsla(0, 0%, 0%, 0.14);
611
- --bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.14), 0 3px 8px hsla(0, 0%, 0%, 0.14), 0 4px 13px hsla(0, 0%, 0%, 0.18);
612
- --bs-xl: 0 10px 24px hsla(0, 0%, 0%, 0.1), 0 20px 48px hsla(0, 0%, 0%, 0.1), 0 1px 4px hsla(0, 0%, 0%, 0.15);
613
-
614
- // Scrollbars
615
- --scrollbar: hsla(0, 0%, 100%, 0.2);
616
-
617
- // Syntax highlighting
618
- --highlight-bg: hsl(0, 2%, 11%);
619
- --highlight-color: var(--black); // AAA 17.19
620
- --highlight-comment: hsl(0, 0%, 60%); // AA 6.03
621
- --highlight-punctuation: hsl(0, 0%, 80%); // AAA 10.70
622
- --highlight-namespace: hsl(@orange-h, 85%, 61.5%); // Custom orange AAA 7.05
623
- --highlight-attribute: hsl(@powder-h + 2, 41.5%, 67%); // Custom powder blue AAA 7.63
624
- --highlight-literal: hsl(@orange-h, 85%, 61.5%); // Custom orange AAA 7.05
625
- --highlight-symbol: hsl(306, 43%, 69%); // Custom purple AAA 7.23
626
- --highlight-keyword: hsl(@powder-h + 3, 41.5%, 67%); // Custom powder blue AAA 7.63
627
- --highlight-variable: hsl(65.5, 39%, 57.5%);
628
- --highlight-addition: var(--green-600); // AAA 8.21
629
- --highlight-deletion: var(--red-700); // AA 5.51
630
- }
631
-
632
- .dark-themed-colors() {
633
- // Reassemble as a single hsl value
634
- --theme-primary-color: .assemble-color(theme-primary-color)[];
635
-
636
- // Reassemble as a single hsl value
637
- --theme-secondary-color: .assemble-color(theme-secondary-color)[];
638
-
639
- // Primary Theming
640
- --theme-primary-025: .native-darken-desaturate(theme-primary-color, 17, 82)[];
641
- --theme-primary-050: .native-darken-desaturate(theme-primary-color, 15, 47)[];
642
- --theme-primary-075: .native-darken-desaturate(theme-primary-color, 13, 39)[];
643
- --theme-primary-100: .native-darken-desaturate(theme-primary-color, 11, 32)[];
644
- --theme-primary-150: .native-darken-desaturate(theme-primary-color, 9, 23)[];
645
- --theme-primary-200: .native-darken-desaturate(theme-primary-color, 7, 15)[];
646
- --theme-primary-300: .native-darken-desaturate(theme-primary-color, 5, 7)[];
647
- --theme-primary-350: var(--theme-primary-color);
648
- --theme-primary-400: .native-tint(theme-primary-color, 21)[];
649
- --theme-primary-500: .native-tint(theme-primary-color, 36)[];
650
- --theme-primary-600: .native-tint(theme-primary-color, 51)[];
651
- --theme-primary-700: .native-tint(theme-primary-color, 66)[];
652
- --theme-primary-800: .native-tint(theme-primary-color, 81)[];
653
- --theme-primary-900: .native-tint(theme-primary-color, 96)[];
654
-
655
- // Secondary Theming
656
- --theme-secondary-025: .native-darken-desaturate(theme-secondary-color, 17, 82)[];
657
- --theme-secondary-050: .native-darken-desaturate(theme-secondary-color, 15, 47)[];
658
- --theme-secondary-075: .native-darken-desaturate(theme-secondary-color, 13, 39)[];
659
- --theme-secondary-100: .native-darken-desaturate(theme-secondary-color, 11, 32)[];
660
- --theme-secondary-150: .native-darken-desaturate(theme-secondary-color, 9, 23)[];
661
- --theme-secondary-200: .native-darken-desaturate(theme-secondary-color, 7, 15)[];
662
- --theme-secondary-300: .native-darken-desaturate(theme-secondary-color, 5, 7)[];
663
- --theme-secondary-350: var(--theme-secondary-color);
664
- --theme-secondary-400: .native-tint(theme-secondary-color, 21)[];
665
- --theme-secondary-500: .native-tint(theme-secondary-color, 36)[];
666
- --theme-secondary-600: .native-tint(theme-secondary-color, 51)[];
667
- --theme-secondary-700: .native-tint(theme-secondary-color, 66)[];
668
- --theme-secondary-800: .native-tint(theme-secondary-color, 81)[];
669
- --theme-secondary-900: .native-tint(theme-secondary-color, 96)[];
670
-
671
- // Fades
672
- --focus-ring: .native-fade(theme-secondary-color, 25)[];
673
- }
674
-
675
- // rules shared between .theme-dark and .theme-system w/ prefers-color-scheme: dark
676
- .theme-dark-rules() {
677
- .dark-colors();
678
-
679
- &,
680
- & .themed {
681
- color: var(--theme-body-font-color);
682
- .generate-themed-variables(theme-dark);
683
- // add in the themed "native mixins", making sure to scope to the child .themed elements so they don't use the parent's values
684
- .dark-themed-colors();
685
- &:extend(.component-colors);
686
- }
687
- }
688
-
689
- // -- High contrast modes
690
- .light-highcontrast() {
691
- --white: hsl(0, 0%, 100%);
692
- --black: hsl(0, 0%, 0%);
693
-
694
- // Black
695
- --black-025: hsl(@black-h, @black-s, 97.5%);
696
- --black-050: hsl(@black-h, @black-s, 95%);
697
- --black-075: hsl(@black-h, @black-s, 92.5%);
698
- --black-100: hsl(@black-h, @black-s, 90%);
699
- --black-150: hsl(@black-h, @black-s, 87.5%);
700
- --black-200: hsl(@black-h, @black-s, 85%);
701
- --black-300: hsl(@black-h, @black-s, 35%);
702
- --black-350: hsl(@black-h, @black-s, 32.5%);
703
- --black-400: hsl(@black-h, @black-s, 30%);
704
- --black-500: hsl(@black-h, @black-s, 25%);
705
- --black-600: hsl(@black-h, @black-s, 20%);
706
- --black-700: hsl(@black-h, @black-s, 15%);
707
- --black-750: hsl(@black-h, @black-s, 10%);
708
- --black-800: hsl(@black-h, @black-s, 5%);
709
- --black-900: hsl(@black-h, @black-s, 0%);
710
-
711
- // Orange
712
- --orange-050: hsl(@orange-h, 100%, 97.5%);
713
- --orange-100: hsl(@orange-h, 100%, 94%);
714
- --orange-200: hsl(@orange-h, 100%, 88%);
715
- --orange-300: hsl(@orange-h, 100%, 82%);
716
- --orange-400: hsl(@orange-h, 100%, 34%);
717
- --orange-500: hsl(@orange-h, 100%, 29%);
718
- --orange-600: hsl(@orange-h, 100%, 24%);
719
- --orange-700: hsl(@orange-h, 100%, 19%);
720
- --orange-800: hsl(@orange-h, 100%, 13%);
721
- --orange-900: hsl(@orange-h, 100%, 8%);
722
-
723
- // Blue
724
- --blue-050: hsl(@blue-h, 100%, 97.5%);
725
- --blue-100: hsl(@blue-h, 100%, 95%);
726
- --blue-200: hsl(@blue-h, 100%, 90%);
727
- --blue-300: hsl(@blue-h, 100%, 85%);
728
- --blue-400: hsl(@blue-h, 100%, 25%);
729
- --blue-500: hsl(@blue-h, 100%, 20%);
730
- --blue-600: hsl(@blue-h, 100%, 15%);
731
- --blue-700: hsl(@blue-h, 100%, 10%);
732
- --blue-800: hsl(@blue-h, 100%, 7.5%);
733
- --blue-900: hsl(@blue-h, 100%, 5%);
734
-
735
- // Powder
736
- --powder-050: hsl(@powder-h, 100%, 97.5%);
737
- --powder-100: hsl(@powder-h, 85%, 96%);
738
- --powder-200: hsl(@powder-h, 75%, 92%);
739
- --powder-300: hsl(@powder-h, 70%, 88%);
740
- --powder-400: hsl(@powder-h, 55%, 28%);
741
- --powder-500: hsl(@powder-h, 60%, 24%);
742
- --powder-600: hsl(@powder-h, 70%, 20%);
743
- --powder-700: hsl(@powder-h, 75%, 16%);
744
- --powder-800: hsl(@powder-h, 75%, 12%);
745
- --powder-900: hsl(@powder-h, 75%, 8%);
746
-
747
- // Green
748
- --green-025: hsl(@green-h, 100%, 97%);
749
- --green-050: hsl(@green-h, 100%, 96%);
750
- --green-100: hsl(@green-h, 100%, 94%);
751
- --green-200: hsl(@green-h, 100%, 88%);
752
- --green-300: hsl(@green-h, 100%, 82%);
753
- --green-400: hsl(@green-h, 100%, 18%);
754
- --green-500: hsl(@green-h, 100%, 15%);
755
- --green-600: hsl(@green-h, 100%, 12%);
756
- --green-700: hsl(@green-h, 100%, 9%);
757
- --green-800: hsl(@green-h, 100%, 6%);
758
- --green-900: hsl(@green-h, 100%, 3%);
759
-
760
- // Yellow
761
- --yellow-050: hsl(@yellow-h, 100%, 95%);
762
- --yellow-100: hsl(@yellow-h, 100%, 92%);
763
- --yellow-200: hsl(@yellow-h, 95%, 85%);
764
- --yellow-300: hsl(@yellow-h, 95%, 78%);
765
- --yellow-400: hsl(@yellow-h, 100%, 28%);
766
- --yellow-500: hsl(@yellow-h, 100%, 26%);
767
- --yellow-600: hsl(@yellow-h, 100%, 23%);
768
- --yellow-700: hsl(@yellow-h, 100%, 19%);
769
- --yellow-800: hsl(@yellow-h, 100%, 13%);
770
- --yellow-900: hsl(@yellow-h, 100%, 7%);
771
-
772
- // Red
773
- --red-050: hsl(@red-h, 100%, 97.5%);
774
- --red-100: hsl(@red-h, 100%, 95%);
775
- --red-200: hsl(@red-h, 100%, 90%);
776
- --red-300: hsl(@red-h, 100%, 85%);
777
- --red-400: hsl(@red-h, 100%, 35%);
778
- --red-500: hsl(@red-h, 100%, 29%);
779
- --red-600: hsl(@red-h, 100%, 23%);
780
- --red-700: hsl(@red-h, 100%, 17%);
781
- --red-800: hsl(@red-h, 100%, 11%);
782
- --red-900: hsl(@red-h, 100%, 7%);
783
-
784
- // Gold
785
- --gold: hsl(@gold-h, 100%, 50%);
786
- --gold-lighter: hsl(@gold-h, 100%, 91%);
787
- --gold-darker: hsl(@gold-h - 3, 100%, 20%);
788
-
789
- // Silver
790
- --silver: hsl(@silver-h, 6%, 72%);
791
- --silver-lighter: hsl(@silver-h, 6%, 91%);
792
- --silver-darker: hsl(@silver-h, 6%, 30%);
793
-
794
- // Bronze
795
- --bronze: hsl(@bronze-h, 38%, 65%);
796
- --bronze-lighter: hsl(@bronze-h, 40%, 92%);
797
- --bronze-darker: hsl(@bronze-h, 31%, 25%);
798
-
799
- // Border colors
800
- --bc-lightest: var(--black-400);
801
- --bc-lighter: var(--black-400);
802
- --bc-light: var(--black-400);
803
- --bc-medium: var(--black-400);
804
- --bc-dark: var(--black-700);
805
- --bc-darker: var(--black-900);
806
-
807
- // Font colors
808
- --fc-dark: var(--black-900);
809
- --fc-medium: var(--black-700);
810
- --fc-light: var(--black-500);
811
-
812
- // Focus rings
813
- --focus-ring: fade(@blue-600, 90%);
814
- --focus-ring-success: fade(@green-600, 90%);
815
- --focus-ring-warning: fade(@yellow-600, 90%);
816
- --focus-ring-error: fade(@red-600, 90%);
817
- --focus-ring-muted: fade(@black-400, 95%);
818
-
819
- // Shadows
820
- --bs-sm: none;
821
- --bs-md: none;
822
- --bs-lg: none;
823
- --bs-xl: none;
824
-
825
- // Scrollbars
826
- --scrollbar: var(--black);
827
-
828
- // Syntax highlighting
829
- --highlight-bg: hsl(0, 0%, 96.5%); // Between black-025 and black-050
830
- --highlight-color: var(--black-750);
831
- --highlight-comment: hsl(213, 7%, 33%); // Custom black
832
- --highlight-punctuation: var(--black-600);
833
- --highlight-namespace: hsl(16, 94%, 31%); // Custom orange
834
- --highlight-attribute: hsl(215, 100%, 35%); // Custom blue
835
- --highlight-literal: hsl(16, 94%, 31%); // Custom orange
836
- --highlight-symbol: hsl(309, 45%, 31%); // Custom purple
837
- --highlight-keyword: hsl(215, 100%, 35%); // Custom blue
838
- --highlight-variable: hsl(88, 100%, 19%); // Custom green
839
- --highlight-addition: var(--green-500);
840
- --highlight-deletion: var(--red-500);
841
-
842
- // High contrast theme override
843
- &:extend(.highcontrast-themed-colors);
844
- }
845
-
846
- .dark-highcontrast() {
847
- --white: hsl(0, 0%, 0%);
848
- --black: hsl(0, 0%, 100%);
849
-
850
- // Black
851
- --black-025: hsl(@black-h, @black-s, 2.5%);
852
- --black-050: hsl(@black-h, @black-s, 5%);
853
- --black-075: hsl(@black-h, @black-s, 7.5%);
854
- --black-100: hsl(@black-h, @black-s, 10%);
855
- --black-150: hsl(@black-h, @black-s, 12.5%);
856
- --black-200: hsl(@black-h, @black-s, 15%);
857
- --black-300: hsl(@black-h, @black-s, 65%);
858
- --black-350: hsl(@black-h, @black-s, 67.5%);
859
- --black-400: hsl(@black-h, @black-s, 70%);
860
- --black-500: hsl(@black-h, @black-s, 75%);
861
- --black-600: hsl(@black-h, @black-s, 80%);
862
- --black-700: hsl(@black-h, @black-s, 85%);
863
- --black-750: hsl(@black-h, @black-s, 90%);
864
- --black-800: hsl(@black-h, @black-s, 95%);
865
- --black-900: hsl(@black-h, @black-s, 100%);
866
-
867
- // Orange
868
- --orange-050: hsl(@orange-h, 100%, 4%);
869
- --orange-100: hsl(@orange-h, 100%, 8%);
870
- --orange-200: hsl(@orange-h, 100%, 16%);
871
- --orange-300: hsl(@orange-h, 100%, 24%);
872
- --orange-400: hsl(@orange-h, 100%, 64%);
873
- --orange-500: hsl(@orange-h, 100%, 71%);
874
- --orange-600: hsl(@orange-h, 100%, 77%);
875
- --orange-700: hsl(@orange-h, 100%, 82%);
876
- --orange-800: hsl(@orange-h, 100%, 87%);
877
- --orange-900: hsl(@orange-h, 100%, 91%);
878
-
879
- // Blue
880
- --blue-050: hsl(@blue-h, 100%, 4%);
881
- --blue-100: hsl(@blue-h, 100%, 11%);
882
- --blue-200: hsl(@blue-h, 100%, 18%);
883
- --blue-300: hsl(@blue-h, 100%, 25%);
884
- --blue-400: hsl(@blue-h, 100%, 75%);
885
- --blue-500: hsl(@blue-h, 100%, 80%);
886
- --blue-600: hsl(@blue-h, 100%, 85%);
887
- --blue-700: hsl(@blue-h, 100%, 90%);
888
- --blue-800: hsl(@blue-h, 100%, 92.5%);
889
- --blue-900: hsl(@blue-h, 100%, 95%);
890
-
891
- // Powder
892
- --powder-050: hsl(@powder-h, 100%, 6%);
893
- --powder-100: hsl(@powder-h, 90%, 8%);
894
- --powder-200: hsl(@powder-h, 80%, 14%);
895
- --powder-300: hsl(@powder-h, 60%, 20%);
896
- --powder-400: hsl(@powder-h, 55%, 72%);
897
- --powder-500: hsl(@powder-h, 60%, 76%);
898
- --powder-600: hsl(@powder-h, 70%, 80%);
899
- --powder-700: hsl(@powder-h, 75%, 84%);
900
- --powder-800: hsl(@powder-h, 75%, 88%);
901
- --powder-900: hsl(@powder-h, 75%, 92%);
902
-
903
- // Green
904
- --green-025: hsl(@green-h, 100%, 3%);
905
- --green-050: hsl(@green-h, 100%, 4%);
906
- --green-100: hsl(@green-h, 100%, 6%);
907
- --green-200: hsl(@green-h, 100%, 12%);
908
- --green-300: hsl(@green-h, 100%, 18%);
909
- --green-400: hsl(@green-h, 100%, 65%);
910
- --green-500: hsl(@green-h, 100%, 71%);
911
- --green-600: hsl(@green-h, 100%, 77%);
912
- --green-700: hsl(@green-h, 100%, 83%);
913
- --green-800: hsl(@green-h, 100%, 89%);
914
- --green-900: hsl(@green-h, 100%, 94%);
915
-
916
- // Yellow
917
- --yellow-050: hsl(@yellow-h, 100%, 4%);
918
- --yellow-100: hsl(@yellow-h, 100%, 8%);
919
- --yellow-200: hsl(@yellow-h, 95%, 16%);
920
- --yellow-300: hsl(@yellow-h, 95%, 24%);
921
- --yellow-400: hsl(@yellow-h, 100%, 55%);
922
- --yellow-500: hsl(@yellow-h, 100%, 63%);
923
- --yellow-600: hsl(@yellow-h, 100%, 71%);
924
- --yellow-700: hsl(@yellow-h, 100%, 79%);
925
- --yellow-800: hsl(@yellow-h, 100%, 87%);
926
- --yellow-900: hsl(@yellow-h, 100%, 95%);
927
-
928
- // Red
929
- --red-050: hsl(@red-h, 100%, 4%);
930
- --red-100: hsl(@red-h, 100%, 8%);
931
- --red-200: hsl(@red-h, 100%, 16%);
932
- --red-300: hsl(@red-h, 100%, 24%);
933
- --red-400: hsl(@red-h, 100%, 70%);
934
- --red-500: hsl(@red-h, 100%, 75%);
935
- --red-600: hsl(@red-h, 100%, 80%);
936
- --red-700: hsl(@red-h, 100%, 85%);
937
- --red-800: hsl(@red-h, 100%, 90%);
938
- --red-900: hsl(@red-h, 100%, 95%);
939
-
940
- // Gold
941
- --gold: hsl(@gold-h, 100%, 50%);
942
- --gold-lighter: hsl(@gold-h - 3, 100%, 9%);
943
- --gold-darker: hsl(@gold-h - 3, 100%, 80%);
944
-
945
- // Silver
946
- --silver: hsl(@silver-h, 6%, 72%);
947
- --silver-lighter: hsl(@silver-h, 5%, 9%);
948
- --silver-darker: hsl(@silver-h, 5%, 70%);
949
-
950
- // Bronze
951
- --bronze: hsl(@bronze-h, 38%, 65%);
952
- --bronze-lighter: hsl(@bronze-h, 40%, 8%);
953
- --bronze-darker: hsl(@bronze-h, 46.7%, 75%);
954
-
955
- // Border colors
956
- --bc-lightest: var(--black-400);
957
- --bc-lighter: var(--black-400);
958
- --bc-light: var(--black-400);
959
- --bc-medium: var(--black-400);
960
- --bc-dark: var(--black-700);
961
- --bc-darker: var(--black-900);
962
-
963
- // Focus rings
964
- --focus-ring: fade(@blue-600, 90%);
965
- --focus-ring-success: fade(@green-600, 90%);
966
- --focus-ring-warning: fade(@yellow-600, 90%);
967
- --focus-ring-error: fade(@red-600, 90%);
968
- --focus-ring-muted: fade(@black-400, 95%);
969
-
970
- // Font colors
971
- --fc-dark: var(--black-900);
972
- --fc-medium: var(--black-700);
973
- --fc-light: var(--black-500);
974
-
975
- // Shadows
976
- --bs-sm: none;
977
- --bs-md: none;
978
- --bs-lg: none;
979
- --bs-xl: none;
980
-
981
- // Scrollbars
982
- --scrollbar: var(--black);
983
-
984
- // Syntax highlighting
985
- --highlight-bg: hsl(0, 0%, 10%);
986
- --highlight-color: hsl(0, 0%, 100%);
987
- --highlight-comment: hsl(0, 0%, 99%); // Custom gray
988
- --highlight-punctuation: hsl(0, 0%, 99%); // Custom gray
989
- --highlight-namespace: hsl(36, 96%, 71%); // Custom orange
990
- --highlight-attribute: hsl(200, 57%, 85%); // Custom blue
991
- --highlight-literal: hsl(36, 96%, 71%); // Custom orange
992
- --highlight-symbol: hsl(304, 39%, 85%); // Custom purple
993
- --highlight-keyword: hsl(200, 57%, 85%); // Custom blue
994
- --highlight-variable: hsl(62, 71%, 81%); // Custom green
995
- --highlight-addition: var(--green-600);
996
- --highlight-deletion: var(--red-700);
997
-
998
- // High contrast theme override
999
- &:extend(.highcontrast-themed-colors);
1000
- }
1001
-
1002
- .highcontrast-themed-colors {
1003
- // Primary Theming
1004
- --theme-primary-color: var(--orange-400);
1005
- --theme-primary-025: var(--orange-050);
1006
- --theme-primary-050: var(--orange-050);
1007
- --theme-primary-075: var(--orange-050);
1008
- --theme-primary-100: var(--orange-100);
1009
- --theme-primary-150: var(--orange-100);
1010
- --theme-primary-200: var(--orange-200);
1011
- --theme-primary-300: var(--orange-300);
1012
- --theme-primary-350: var(--orange-300);
1013
- --theme-primary-400: var(--orange-400);
1014
- --theme-primary-500: var(--orange-500);
1015
- --theme-primary-600: var(--orange-600);
1016
- --theme-primary-700: var(--orange-700);
1017
- --theme-primary-800: var(--orange-800);
1018
- --theme-primary-900: var(--orange-900);
1019
-
1020
- // Secondary Theming
1021
- --theme-secondary-color: var(--blue-400);
1022
- --theme-secondary-025: var(--blue-050);
1023
- --theme-secondary-050: var(--blue-050);
1024
- --theme-secondary-075: var(--blue-050);
1025
- --theme-secondary-100: var(--blue-100);
1026
- --theme-secondary-150: var(--blue-100);
1027
- --theme-secondary-200: var(--blue-200);
1028
- --theme-secondary-300: var(--blue-300);
1029
- --theme-secondary-350: var(--blue-300);
1030
- --theme-secondary-400: var(--blue-400);
1031
- --theme-secondary-500: var(--blue-500);
1032
- --theme-secondary-600: var(--blue-600);
1033
- --theme-secondary-700: var(--blue-700);
1034
- --theme-secondary-800: var(--blue-800);
1035
- --theme-secondary-900: var(--blue-900);
1036
- }
1037
-
1038
- :root {
1039
- // specify the default colors in less, then deconstruct them
1040
- // this keeps the hsl/rgb variables below in sync, but consumers will need to set each variable separately
1041
- @defaultPrimaryColor: @orange;
1042
- @defaultSecondaryColor: @blue;
1043
- .generate-calculated-themed-variables(@defaultPrimaryColor, primary);
1044
- .generate-calculated-themed-variables(@defaultSecondaryColor, secondary);
1045
- }
1046
-
1047
- // place component-colors on the body directly (instead of :root) so consumers can use the --theme-* variables
1048
-
1049
- // Light mode
1050
- body:not(.theme-dark),
1051
- body.theme-dark .theme-light__forced,
1052
- body.theme-system .theme-light__forced {
1053
- .light-colors();
1054
-
1055
- &,
1056
- & .themed {
1057
- color: var(--theme-body-font-color);
1058
- .generate-themed-variables(theme-light);
1059
- // add in the themed "native mixins", making sure to scope to the child .themed elements so they don't use the parent's values
1060
- .light-themed-colors();
1061
- &:extend(.component-colors);
1062
- }
1063
- }
1064
-
1065
- // Dark mode
1066
- body.theme-dark,
1067
- body:not(.theme-dark) .theme-dark__forced {
1068
- .theme-dark-rules();
1069
- }
1070
- body.theme-system {
1071
- @media (prefers-color-scheme: dark) {
1072
- .theme-dark-rules();
1073
- }
1074
- }
1075
-
1076
- // High contrast mode (Light)
1077
- body.theme-highcontrast:not(.theme-dark),
1078
- body.theme-dark.theme-highcontrast .theme-light__forced,
1079
- body.theme-system.theme-highcontrast .theme-light__forced {
1080
- .light-highcontrast();
1081
- }
1082
-
1083
- // High contrast mode (Dark)
1084
- body.theme-dark.theme-highcontrast,
1085
- body.theme-highcontrast:not(.theme-dark) .theme-dark__forced {
1086
- .dark-highcontrast();
1087
- }
1088
- body.theme-system.theme-highcontrast {
1089
- @media (prefers-color-scheme: dark) {
1090
- .dark-highcontrast();
1091
- }
1092
- }
1
+ @import (reference) "./mixins.less";
2
+
3
+ //
4
+ // STACK OVERFLOW
5
+ // CONSTANTS -- COLORS
6
+ //
7
+ // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
8
+ // Stack Overflow. For documentation of all these classes and how to contribute,
9
+ // visit https://stackoverflow.design/
10
+ //
11
+ // ============================================================================
12
+ // $ Legacy Less color variables
13
+ // ----------------------------------------------------------------------------
14
+ // -- Base Hue Values
15
+ @white-h: 0;
16
+ @black-h: 210;
17
+ @orange-h: 27;
18
+ @yellow-h: 47;
19
+ @green-h: 140;
20
+ @blue-h: 206;
21
+ @powder-h: 205;
22
+ @red-h: 358;
23
+ @fog-h: 180;
24
+ @gold-h: 48;
25
+ @silver-h: 210;
26
+ @bronze-h: 28;
27
+
28
+ // -- Base Saturation Values
29
+ @black-s: 8%;
30
+
31
+ // -- Primary Colors
32
+ @white: hsl(@white-h, 0%, 100%);
33
+ @black: hsl(@black-h, @black-s, 5%);
34
+ @orange: hsl(@orange-h, 90%, 55%);
35
+
36
+ // -- Accent Colors
37
+ @yellow: hsl(@yellow-h, 83%, 91%);
38
+ @green: hsl(@green-h, 40%, 55%);
39
+ @blue: hsl(@blue-h, 100%, 40%);
40
+ @powder: hsl(@powder-h, 46%, 92%);
41
+ @red: hsl(@red-h, 62%, 52%);
42
+ @fog: hsl(@fog-h, 7%, 97%);
43
+
44
+ // Black
45
+ @black-025: hsl(@black-h, @black-s, 97.5%);
46
+ @black-050: hsl(@black-h, @black-s, 95%);
47
+ @black-075: hsl(@black-h, @black-s, 90%);
48
+ @black-100: hsl(@black-h, @black-s, 85%);
49
+ @black-150: hsl(@black-h, @black-s, 80%);
50
+ @black-200: hsl(@black-h, @black-s, 75%);
51
+ @black-300: hsl(@black-h, @black-s, 65%);
52
+ @black-350: hsl(@black-h, @black-s, 60%);
53
+ @black-400: hsl(@black-h, @black-s, 55%);
54
+ @black-500: hsl(@black-h, @black-s, 45%);
55
+ @black-600: hsl(@black-h, @black-s, 35%);
56
+ @black-700: hsl(@black-h, @black-s, 25%);
57
+ @black-750: hsl(@black-h, @black-s, 20%);
58
+ @black-800: hsl(@black-h, @black-s, 15%);
59
+ @black-900: @black;
60
+
61
+ // Orange
62
+ @orange-050: hsl(@orange-h, 100%, 97%);
63
+ @orange-100: hsl(@orange-h, 95%, 90%);
64
+ @orange-200: hsl(@orange-h, 90%, 83%);
65
+ @orange-300: hsl(@orange-h, 90%, 70%);
66
+ @orange-400: @orange;
67
+ @orange-500: hsl(@orange-h, 90%, 50%);
68
+ @orange-600: hsl(@orange-h, 90%, 45%);
69
+ @orange-700: hsl(@orange-h, 90%, 39%);
70
+ @orange-800: hsl(@orange-h, 87%, 35%);
71
+ @orange-900: hsl(@orange-h, 80%, 30%);
72
+
73
+ // Blue
74
+ @blue-050: hsl(@blue-h, 100%, 97%);
75
+ @blue-100: hsl(@blue-h, 96%, 90%);
76
+ @blue-200: hsl(@blue-h, 93%, 83.5%);
77
+ @blue-300: hsl(@blue-h, 90%, 69.5%);
78
+ @blue-400: hsl(@blue-h, 85%, 57.5%);
79
+ @blue-500: hsl(@blue-h, 100%, 52%);
80
+ @blue-600: @blue;
81
+ @blue-700: hsl(@blue-h + 3, 100%, 37.5%);
82
+ @blue-800: hsl(@blue-h + 3, 100%, 32%);
83
+ @blue-900: hsl(@blue-h + 3, 100%, 26%);
84
+
85
+ // Powder
86
+ @powder-050: hsl(@powder-h, 47%, 97%);
87
+ @powder-100: @powder;
88
+ @powder-200: hsl(@powder-h, 53%, 88%);
89
+ @powder-300: hsl(@powder-h, 57%, 81%);
90
+ @powder-400: hsl(@powder-h, 56%, 76%);
91
+ @powder-500: hsl(@powder-h, 41%, 63%);
92
+ @powder-600: hsl(@powder-h, 36%, 53%);
93
+ @powder-700: hsl(@powder-h, 47%, 42%);
94
+ @powder-800: hsl(@powder-h, 46%, 32%);
95
+ @powder-900: hsl(@powder-h, 46%, 22%);
96
+
97
+ // Green
98
+ @green-025: hsl(@green-h, 42%, 95%);
99
+ @green-050: hsl(@green-h, 40%, 90%);
100
+ @green-100: hsl(@green-h, 40%, 85%);
101
+ @green-200: hsl(@green-h, 40%, 75%);
102
+ @green-300: hsl(@green-h, 40%, 65%);
103
+ @green-400: @green;
104
+ @green-500: hsl(@green-h, 40%, 47%);
105
+ @green-600: hsl(@green-h, 40%, 40%);
106
+ @green-700: hsl(@green-h, 41%, 31%);
107
+ @green-800: hsl(@green-h, 40%, 27%);
108
+ @green-900: hsl(@green-h, 40%, 20%);
109
+
110
+ // Yellow
111
+ @yellow-050: hsl(@yellow-h, 87%, 94%);
112
+ @yellow-100: @yellow;
113
+ @yellow-200: hsl(@yellow-h, 65%, 84%);
114
+ @yellow-300: hsl(@yellow-h, 69%, 69%);
115
+ @yellow-400: hsl(@yellow-h, 79%, 58%);
116
+ @yellow-500: hsl(@yellow-h, 73%, 50%);
117
+ @yellow-600: hsl(@yellow-h, 76%, 46%);
118
+ @yellow-700: hsl(@yellow-h, 79%, 40%);
119
+ @yellow-800: hsl(@yellow-h, 82%, 34%);
120
+ @yellow-900: hsl(@yellow-h, 84%, 28%);
121
+
122
+ // Red
123
+ @red-050: hsl(@red-h, 75%, 97%);
124
+ @red-100: hsl(@red-h, 76%, 90%);
125
+ @red-200: hsl(@red-h, 74%, 83%);
126
+ @red-300: hsl(@red-h, 70%, 70%);
127
+ @red-400: hsl(@red-h, 68%, 59%);
128
+ @red-500: @red;
129
+ @red-600: hsl(@red-h, 62%, 47%);
130
+ @red-700: hsl(@red-h, 64%, 41%);
131
+ @red-800: hsl(@red-h, 64%, 35%);
132
+ @red-900: hsl(@red-h, 67%, 29%);
133
+
134
+ // $ BADGES
135
+ // ----------------------------------------------------------------------------
136
+ @gold: hsl(@gold-h, 100%, 50%);
137
+ @gold-lighter: hsl(@gold-h, 100%, 91%);
138
+ @gold-darker: hsl(@gold-h - 3, 100%, 47%);
139
+
140
+ @silver: hsl(@silver-h, 6%, 72%);
141
+ @silver-lighter: hsl(@silver-h, 0%, 91%);
142
+ @silver-darker: hsl(@silver-h, 3%, 61%);
143
+
144
+ @bronze: hsl(@bronze-h, 38%, 67%);
145
+ @bronze-lighter: hsl(@bronze-h, 40%, 92%);
146
+ @bronze-darker: hsl(@bronze-h, 31%, 52%);
147
+
148
+ // $ SCROLLBARS
149
+ // ----------------------------------------------------------------------------
150
+ @scrollbar: hsla(0, 0%, 0%, 0.2);
151
+
152
+ // ============================================================================
153
+ // $ CSS Variable Colors
154
+ // ----------------------------------------------------------------------------
155
+
156
+ .generate-calculated-themed-variables(@primary, @designation: primary, @theme: base) {
157
+ // Split into h/s/l/a values
158
+ --theme-@{theme}-@{designation}-color-h: hue(@primary);
159
+ --theme-@{theme}-@{designation}-color-s: saturation(@primary);
160
+ --theme-@{theme}-@{designation}-color-l: lightness(@primary);
161
+
162
+ // Split into r/g/b values
163
+ --theme-@{theme}-@{designation}-color-r: red(@primary);
164
+ --theme-@{theme}-@{designation}-color-g: green(@primary);
165
+ --theme-@{theme}-@{designation}-color-b: blue(@primary);
166
+ }
167
+
168
+ .generate-themed-variables(@theme: theme) {
169
+ // Primary color
170
+ // Split into h/s/l/a values
171
+ --theme-primary-color-h: var(~"--@{theme}-primary-color-h", var(--theme-base-primary-color-h));
172
+ --theme-primary-color-s: var(~"--@{theme}-primary-color-s", var(--theme-base-primary-color-s));
173
+ --theme-primary-color-l: var(~"--@{theme}-primary-color-l", var(--theme-base-primary-color-l));
174
+
175
+ // Split into r/g/b values
176
+ --theme-primary-color-r: var(~"--@{theme}-primary-color-r", var(--theme-base-primary-color-r));
177
+ --theme-primary-color-g: var(~"--@{theme}-primary-color-g", var(--theme-base-primary-color-g));
178
+ --theme-primary-color-b: var(~"--@{theme}-primary-color-b", var(--theme-base-primary-color-b));
179
+
180
+ // Secondary color
181
+ // Split into h/s/l/a values
182
+ --theme-secondary-color-h: var(~"--@{theme}-secondary-color-h", var(--theme-base-secondary-color-h));
183
+ --theme-secondary-color-s: var(~"--@{theme}-secondary-color-s", var(--theme-base-secondary-color-s));
184
+ --theme-secondary-color-l: var(~"--@{theme}-secondary-color-l", var(--theme-base-secondary-color-l));
185
+
186
+ // Split into r/g/b values
187
+ --theme-secondary-color-r: var(~"--@{theme}-secondary-color-r", var(--theme-base-secondary-color-r));
188
+ --theme-secondary-color-g: var(~"--@{theme}-secondary-color-g", var(--theme-base-secondary-color-g));
189
+ --theme-secondary-color-b: var(~"--@{theme}-secondary-color-b", var(--theme-base-secondary-color-b));
190
+ }
191
+
192
+ .component-colors {
193
+ --theme-body-font-color: var(--black-800);
194
+ --theme-background-color: var(--white);
195
+ // Links
196
+ --theme-link-color: var(--theme-secondary-400);
197
+ --theme-link-color-hover: var(--theme-secondary-350);
198
+ --theme-link-color-visited: var(--theme-secondary-500);
199
+
200
+ // Button Default (Secondary)
201
+ --theme-button-color: var(--theme-secondary-400);
202
+ --theme-button-background-color: transparent;
203
+ --theme-button-hover-color: var(--theme-secondary-500);
204
+ --theme-button-hover-background-color: var(--theme-secondary-050);
205
+ --theme-button-active-background-color: var(--theme-secondary-100);
206
+ --theme-button-selected-color: var(--theme-secondary-900);
207
+ --theme-button-selected-background-color: var(--theme-secondary-150);
208
+
209
+ // Button Primary
210
+ --theme-button-primary-color: var(--white);
211
+ --theme-button-primary-background-color: var(--theme-secondary-400);
212
+ --theme-button-primary-hover-color: var(--white);
213
+ --theme-button-primary-hover-background-color: var(--theme-secondary-500);
214
+ --theme-button-primary-active-background-color: var(--theme-secondary-700);
215
+ --theme-button-primary-selected-color: var(--white);
216
+ --theme-button-primary-selected-background-color: var(--theme-secondary-700);
217
+ --theme-button-primary-number-color: var(--theme-secondary-900);
218
+
219
+ // Button Filled
220
+ --theme-button-filled-color: var(--theme-secondary-700);
221
+ --theme-button-filled-background-color: var(--theme-secondary-050);
222
+ --theme-button-filled-border-color: var(--theme-secondary-350);
223
+ --theme-button-filled-hover-color: var(--theme-secondary-800);
224
+ --theme-button-filled-hover-background-color: var(--theme-secondary-100);
225
+ --theme-button-filled-active-background-color: var(--theme-secondary-150);
226
+ --theme-button-filled-active-border-color: var(--theme-secondary-350);
227
+ --theme-button-filled-selected-color: var(--theme-secondary-900);
228
+ --theme-button-filled-selected-background-color: var(--theme-secondary-300);
229
+ --theme-button-filled-selected-border-color: var(--theme-secondary-500);
230
+
231
+ // Button Outline
232
+ --theme-button-outlined-border-color: var(--theme-secondary-300);
233
+ --theme-button-outlined-selected-border-color: var(--theme-secondary-400);
234
+
235
+ // Tags
236
+ --theme-tag-color: var(--theme-secondary-800);
237
+ --theme-tag-background-color: var(--theme-secondary-075);
238
+ --theme-tag-border-color: transparent;
239
+ --theme-tag-hover-color: var(--theme-secondary-900);
240
+ --theme-tag-hover-background-color: var(--theme-secondary-100);
241
+ --theme-tag-hover-border-color: transparent;
242
+
243
+ // Topbar
244
+ --theme-topbar-height: var(--su-static48);
245
+ --theme-topbar-background-color: var(--black-025);
246
+
247
+ // Topbar Search input
248
+ --theme-topbar-search-color: var(--black-700);
249
+ --theme-topbar-search-background: var(--white);
250
+ --theme-topbar-search-placeholder: var(--black-200);
251
+ --theme-topbar-search-border: var(--black-200);
252
+ --theme-topbar-search-border-focus: var(--blue-300);
253
+ --theme-topbar-search-shadow-focus: 0 0 0 var(--su-static4) var(--focus-ring);
254
+
255
+ // Topbar Search switcher
256
+ --theme-topbar-select-color: var(--black-700);
257
+ --theme-topbar-select-background: var(--black-075);
258
+
259
+ // Topbar items
260
+ --theme-topbar-item-color: var(--black-600);
261
+ --theme-topbar-item-color-hover: var(--black-800);
262
+ --theme-topbar-item-background-hover: var(--black-075);
263
+ --theme-topbar-item-color-current: var(--black);
264
+ --theme-topbar-item-border-current: var(--theme-primary-color);
265
+
266
+ // Topbar themed border accent
267
+ --theme-topbar-accent-border: 3px solid var(--theme-primary-color);
268
+
269
+ // Post summary
270
+ --theme-post-title-color: var(--theme-link-color);
271
+ --theme-post-title-color-hover: var(--theme-link-color-hover);
272
+ --theme-post-title-color-visited: var(--theme-link-color-visited);
273
+ --theme-post-title-font-family: var(--theme-body-font-family);
274
+ --theme-post-body-font-family: var(--theme-body-font-family);
275
+ }
276
+
277
+ // -- Light mode
278
+ .light-colors() {
279
+ --white: @white;
280
+ --black: @black;
281
+ --orange: @orange;
282
+ --yellow: @yellow;
283
+ --green: @green;
284
+ --blue: @blue;
285
+ --powder: @powder;
286
+ --red: @red;
287
+
288
+ // Black
289
+ --black-025: @black-025;
290
+ --black-050: @black-050;
291
+ --black-075: @black-075;
292
+ --black-100: @black-100;
293
+ --black-150: @black-150;
294
+ --black-200: @black-200;
295
+ --black-300: @black-300;
296
+ --black-350: @black-350;
297
+ --black-400: @black-400;
298
+ --black-500: @black-500;
299
+ --black-600: @black-600;
300
+ --black-700: @black-700;
301
+ --black-750: @black-750;
302
+ --black-800: @black-800;
303
+ --black-900: @black-900;
304
+
305
+ // Orange
306
+ --orange-050: @orange-050;
307
+ --orange-100: @orange-100;
308
+ --orange-200: @orange-200;
309
+ --orange-300: @orange-300;
310
+ --orange-400: @orange-400;
311
+ --orange-500: @orange-500;
312
+ --orange-600: @orange-600;
313
+ --orange-700: @orange-700;
314
+ --orange-800: @orange-800;
315
+ --orange-900: @orange-900;
316
+
317
+ // Blue
318
+ --blue-050: @blue-050;
319
+ --blue-100: @blue-100;
320
+ --blue-200: @blue-200;
321
+ --blue-300: @blue-300;
322
+ --blue-400: @blue-400;
323
+ --blue-500: @blue-500;
324
+ --blue-600: @blue-600;
325
+ --blue-700: @blue-700;
326
+ --blue-800: @blue-800;
327
+ --blue-900: @blue-900;
328
+
329
+ // Powder
330
+ --powder-050: @powder-050;
331
+ --powder-100: @powder-100;
332
+ --powder-200: @powder-200;
333
+ --powder-300: @powder-300;
334
+ --powder-400: @powder-400;
335
+ --powder-500: @powder-500;
336
+ --powder-600: @powder-600;
337
+ --powder-700: @powder-700;
338
+ --powder-800: @powder-800;
339
+ --powder-900: @powder-900;
340
+
341
+ // Green
342
+ --green-025: @green-025;
343
+ --green-050: @green-050;
344
+ --green-100: @green-100;
345
+ --green-200: @green-200;
346
+ --green-300: @green-300;
347
+ --green-400: @green-400;
348
+ --green-500: @green-500;
349
+ --green-600: @green-600;
350
+ --green-700: @green-700;
351
+ --green-800: @green-800;
352
+ --green-900: @green-900;
353
+
354
+ // Yellow
355
+ --yellow-050: @yellow-050;
356
+ --yellow-100: @yellow-100;
357
+ --yellow-200: @yellow-200;
358
+ --yellow-300: @yellow-300;
359
+ --yellow-400: @yellow-400;
360
+ --yellow-500: @yellow-500;
361
+ --yellow-600: @yellow-600;
362
+ --yellow-700: @yellow-700;
363
+ --yellow-800: @yellow-800;
364
+ --yellow-900: @yellow-900;
365
+
366
+ // Red
367
+ --red-050: @red-050;
368
+ --red-100: @red-100;
369
+ --red-200: @red-200;
370
+ --red-300: @red-300;
371
+ --red-400: @red-400;
372
+ --red-500: @red-500;
373
+ --red-600: @red-600;
374
+ --red-700: @red-700;
375
+ --red-800: @red-800;
376
+ --red-900: @red-900;
377
+
378
+ // Gold
379
+ --gold: @gold;
380
+ --gold-lighter: @gold-lighter;
381
+ --gold-darker: @gold-darker;
382
+
383
+ // Silver
384
+ --silver: @silver;
385
+ --silver-lighter: @silver-lighter;
386
+ --silver-darker: @silver-darker;
387
+
388
+ // Bronze
389
+ --bronze: @bronze;
390
+ --bronze-lighter: @bronze-lighter;
391
+ --bronze-darker: @bronze-darker;
392
+
393
+ // Border colors
394
+ --bc-lightest: var(--black-025);
395
+ --bc-lighter: var(--black-050);
396
+ --bc-light: var(--black-075);
397
+ --bc-medium: var(--black-100);
398
+ --bc-dark: var(--black-150);
399
+ --bc-darker: var(--black-200);
400
+
401
+ // Font colors
402
+ --fc-dark: @black-900;
403
+ --fc-medium: @black-700;
404
+ --fc-light: @black-500;
405
+
406
+ // Focus rings
407
+ --focus-ring-success: hsla(@green-h, 40%, 75%, 40%);
408
+ --focus-ring-warning: hsla(@yellow-h, 79%, 58%, 40%);
409
+ --focus-ring-error: hsla(@red-h, 62%, 47%, 15%);
410
+ --focus-ring-muted: hsla(@black-h, @black-s, 15%, 10%);
411
+
412
+ // Shadows
413
+ --bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.05), 0 2px 8px hsla(0, 0%, 0%, 0.05);
414
+ --bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.06), 0 2px 6px hsla(0, 0%, 0%, 0.06), 0 3px 8px hsla(0, 0%, 0%, 0.09);
415
+ --bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.09), 0 3px 8px hsla(0, 0%, 0%, 0.09), 0 4px 13px hsla(0, 0%, 0%, 0.13);
416
+ --bs-xl: 0 10px 24px hsla(0, 0%, 0%, 0.05), 0 20px 48px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.1);
417
+
418
+ // Scrollbars
419
+ --scrollbar: hsla(0, 0, 0, 0.2);
420
+
421
+ // Syntax highlighting
422
+ --highlight-bg: hsl(0, 0%, 96.5%); // Between black-025 and black-050
423
+ --highlight-color: var(--black-750); // AAA 11.78
424
+ --highlight-comment: hsl(@black-h, 8%, 43.5%); // ~black-500 AA 4.80
425
+ --highlight-punctuation: var(--black-600); // AA 6.48
426
+ --highlight-namespace: hsl(@orange-h, 99%, 36%); // Custom orange AA 4.51
427
+ --highlight-attribute: hsl(@blue-h, 98.5%, 29%); // Custom blue AAA 7.25
428
+ --highlight-literal: hsl(@orange-h, 99%, 36%); // Custom orange AA 4.51
429
+ --highlight-symbol: hsl(306, 43%, 35%); // Custom purple AAA 7.30
430
+ --highlight-keyword: hsl(@blue-h, 98.5%, 29%); // Custom blue AAA 7.07
431
+ --highlight-variable: hsl(80, 80.5%, 26.5%); // Custom green AAA 7.25
432
+ --highlight-addition: var(--green-700); // AA 5.59
433
+ --highlight-deletion: var(--red-600); // AA 5.31
434
+ }
435
+
436
+ .light-themed-colors() {
437
+ // Reassemble as a single hsl value
438
+ --theme-primary-color: .assemble-color(theme-primary-color)[];
439
+
440
+ // Steps
441
+ --theme-primary-900: .native-darken(theme-primary-color, 26)[];
442
+ --theme-primary-800: .native-darken(theme-primary-color, 21)[];
443
+ --theme-primary-700: .native-darken(theme-primary-color, 16)[];
444
+ --theme-primary-600: .native-darken(theme-primary-color, 10)[];
445
+ --theme-primary-500: .native-darken(theme-primary-color, 5)[];
446
+ --theme-primary-400: var(--theme-primary-color);
447
+ --theme-primary-350: .native-tint(theme-primary-color, 20)[];
448
+ --theme-primary-300: .native-tint(theme-primary-color, 35)[];
449
+ --theme-primary-200: .native-tint(theme-primary-color, 48)[];
450
+ --theme-primary-150: .native-tint(theme-primary-color, 65)[];
451
+ --theme-primary-100: .native-tint(theme-primary-color, 78)[];
452
+ --theme-primary-075: .native-tint(theme-primary-color, 85)[];
453
+ --theme-primary-050: .native-tint(theme-primary-color, 92)[];
454
+ --theme-primary-025: .native-tint(theme-primary-color, 96)[];
455
+
456
+ // Reassemble as a single hsl value
457
+ --theme-secondary-color: .assemble-color(theme-secondary-color)[];
458
+
459
+ // Steps
460
+ --theme-secondary-900: .native-darken(theme-secondary-color, 26)[];
461
+ --theme-secondary-800: .native-darken(theme-secondary-color, 21)[];
462
+ --theme-secondary-700: .native-darken(theme-secondary-color, 16)[];
463
+ --theme-secondary-600: .native-darken(theme-secondary-color, 10)[];
464
+ --theme-secondary-500: .native-darken(theme-secondary-color, 5)[];
465
+ --theme-secondary-400: var(--theme-secondary-color);
466
+ --theme-secondary-350: .native-tint(theme-secondary-color, 20)[];
467
+ --theme-secondary-300: .native-tint(theme-secondary-color, 35)[];
468
+ --theme-secondary-200: .native-tint(theme-secondary-color, 48)[];
469
+ --theme-secondary-150: .native-tint(theme-secondary-color, 65)[];
470
+ --theme-secondary-100: .native-tint(theme-secondary-color, 78)[];
471
+ --theme-secondary-075: .native-tint(theme-secondary-color, 85)[];
472
+ --theme-secondary-050: .native-tint(theme-secondary-color, 92)[];
473
+ --theme-secondary-025: .native-tint(theme-secondary-color, 96)[];
474
+
475
+ // Fades
476
+ --focus-ring: .native-fade(theme-secondary-color, 15)[];
477
+ }
478
+
479
+ // -- Dark mode
480
+ .dark-colors() {
481
+ --white: hsl(@black-h, 0%, 17.5%);
482
+ --black: @white;
483
+
484
+ // Black
485
+ --black-025: hsl(@black-h, 0%, 22.5%);
486
+ --black-050: hsl(@black-h, 0%, 24%);
487
+ --black-075: hsl(@black-h, 4%, 26%);
488
+ --black-100: hsl(@black-h, 4.5%, 30.5%);
489
+ --black-150: hsl(@black-h, 5%, 35%);
490
+ --black-200: hsl(@black-h, 5.5%, 43.5%);
491
+ --black-300: hsl(@black-h, 6.5%, 52%);
492
+ --black-350: hsl(@black-h, 7%, 61%);
493
+ --black-400: hsl(@black-h, 8%, 65%);
494
+ --black-500: hsl(@black-h, 8%, 70%);
495
+ --black-600: hsl(@black-h, 7%, 78.5%);
496
+ --black-700: hsl(@black-h, 8%, 82.5%);
497
+ --black-750: hsl(@black-h, 9%, 86.5%);
498
+ --black-800: hsl(@black-h, 9%, 91.5%);
499
+ --black-900: hsl(@black-h, 4%, 95%);
500
+
501
+ // Orange
502
+ --orange-050: hsl(@orange-h, 16.5%, 23.9%);
503
+ --orange-100: hsl(@orange-h, 30%, 28.4%);
504
+ --orange-200: hsl(@orange-h, 50%, 36.9%);
505
+ --orange-300: hsl(@orange-h, 70%, 47.3%);
506
+ --orange-400: hsl(@orange-h, 90.5%, 54.9%);
507
+ --orange-500: hsl(@orange-h, 100%, 59%);
508
+ --orange-600: hsl(@orange-h, 100%, 68.4%);
509
+ --orange-700: hsl(@orange-h, 89.5%, 74.1%);
510
+ --orange-800: hsl(@orange-h, 92%, 85.7%);
511
+ --orange-900: hsl(@orange-h, 95%, 91.8%);
512
+
513
+ // Blue
514
+ --blue-050: hsl(@blue-h, 40%, 23%);
515
+ --blue-100: hsl(@blue-h, 44%, 26%);
516
+ --blue-200: hsl(@blue-h, 46%, 30%);
517
+ --blue-300: hsl(@blue-h, 53%, 35%);
518
+ --blue-400: hsl(@blue-h + 3, 56%, 43%);
519
+ --blue-500: hsl(@blue-h, 64%, 51%);
520
+ --blue-600: hsl(@blue-h, 100%, 60%);
521
+ --blue-700: hsl(@blue-h, 90%, 74%);
522
+ --blue-800: hsl(@blue-h, 95%, 86%);
523
+ --blue-900: hsl(@blue-h, 91%, 91.5%);
524
+
525
+ // Powder
526
+ --powder-050: hsl(@powder-h, 5%, 27%);
527
+ --powder-100: hsl(@powder-h, 14%, 28%);
528
+ --powder-200: hsl(@powder-h, 17.5%, 32%);
529
+ --powder-300: hsl(@powder-h, 19.5%, 37%);
530
+ --powder-400: hsl(@powder-h, 22.5%, 44%);
531
+ --powder-500: hsl(@powder-h, 29%, 54%);
532
+ --powder-600: hsl(@powder-h, 50%, 65.5%);
533
+ --powder-700: hsl(@powder-h, 46.5%, 73.5%);
534
+ --powder-800: hsl(@powder-h, 49.5%, 87%);
535
+ --powder-900: hsl(@powder-h, 100%, 95%);
536
+
537
+ // Green
538
+ --green-025: hsl(@green-h, 18%, 22%);
539
+ --green-050: hsl(@green-h, 18%, 25%);
540
+ --green-100: hsl(@green-h, 22.5%, 31%);
541
+ --green-200: hsl(@green-h, 23.5%, 37%);
542
+ --green-300: hsl(@green-h, 25%, 40.5%);
543
+ --green-400: hsl(@green-h, 27.5%, 48.5%);
544
+ --green-500: hsl(@green-h, 35%, 54.5%);
545
+ --green-600: hsl(@green-h, 40%, 61.5%);
546
+ --green-700: hsl(@green-h, 39.5%, 69.5%);
547
+ --green-800: hsl(@green-h, 39.5%, 78.5%);
548
+ --green-900: hsl(@green-h, 38%, 86.5%);
549
+
550
+ // Yellow
551
+ --yellow-050: hsl(@yellow-h, 13%, 24.5%);
552
+ --yellow-100: hsl(@yellow-h, 19%, 27%);
553
+ --yellow-200: hsl(@yellow-h, 30.5%, 31%);
554
+ --yellow-300: hsl(@yellow-h, 37%, 36%);
555
+ --yellow-400: hsl(@yellow-h, 45.5%, 42.5%);
556
+ --yellow-500: hsl(@yellow-h, 55.5%, 48%);
557
+ --yellow-600: hsl(@yellow-h, 67.5%, 55.5%);
558
+ --yellow-700: hsl(@yellow-h, 84.5%, 64%);
559
+ --yellow-800: hsl(@yellow-h, 90%, 72.5%);
560
+ --yellow-900: hsl(@yellow-h, 93%, 83.5%);
561
+
562
+ // Red
563
+ --red-050: hsl(@red-h + 3, 30%, 26.5%);
564
+ --red-100: hsl(@red-h + 3, 35%, 33%);
565
+ --red-200: hsl(@red-h + 3, 37%, 38.5%);
566
+ --red-300: hsl(@red-h + 3, 39%, 43.5%);
567
+ --red-400: hsl(@red-h + 3, 42%, 49%);
568
+ --red-500: hsl(@red-h + 3, 50%, 54%);
569
+ --red-600: hsl(@red-h + 3, 56.5%, 59.5%);
570
+ --red-700: hsl(@red-h + 3, 62.5%, 65.5%);
571
+ --red-800: hsl(@red-h + 3, 64%, 74%);
572
+ --red-900: hsl(@red-h + 3, 65.5%, 85.5%);
573
+
574
+ // Gold
575
+ --gold: @gold;
576
+ --gold-lighter: hsl(@gold-h, 22%, 30%);
577
+ --gold-darker: @gold-darker;
578
+
579
+ // Silver
580
+ --silver: @silver;
581
+ --silver-lighter: hsl(@silver-h, 0%, 26%);
582
+ --silver-darker: @silver-darker;
583
+
584
+ // Bronze
585
+ --bronze: @bronze;
586
+ --bronze-lighter: hsl(@bronze-h, 13%, 27%);
587
+ --bronze-darker: @bronze-darker;
588
+
589
+ // Border colors
590
+ --bc-lightest: var(--black-025);
591
+ --bc-lighter: var(--black-050);
592
+ --bc-light: var(--black-075);
593
+ --bc-medium: var(--black-100);
594
+ --bc-dark: var(--black-150);
595
+ --bc-darker: var(--black-200);
596
+
597
+ // Font colors
598
+ --fc-dark: var(--black-900);
599
+ --fc-medium: var(--black-700);
600
+ --fc-light: var(--black-500);
601
+
602
+ // Focus rings
603
+ --focus-ring-success: hsla(@green-h, 40%, 75%, 40%);
604
+ --focus-ring-warning: hsla(@yellow-h, 79%, 58%, 40%);
605
+ --focus-ring-error: hsla(@red-h, 62%, 52%, 30%);
606
+ --focus-ring-muted: hsla(@black-h, @black-s, 100%, 10%);
607
+
608
+ // Shadows
609
+ --bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.1), 0 1px 4px hsla(0, 0%, 0%, 0.1), 0 2px 8px hsla(0, 0%, 0%, 0.1);
610
+ --bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.11), 0 2px 6px hsla(0, 0%, 0%, 0.11), 0 3px 8px hsla(0, 0%, 0%, 0.14);
611
+ --bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.14), 0 3px 8px hsla(0, 0%, 0%, 0.14), 0 4px 13px hsla(0, 0%, 0%, 0.18);
612
+ --bs-xl: 0 10px 24px hsla(0, 0%, 0%, 0.1), 0 20px 48px hsla(0, 0%, 0%, 0.1), 0 1px 4px hsla(0, 0%, 0%, 0.15);
613
+
614
+ // Scrollbars
615
+ --scrollbar: hsla(0, 0%, 100%, 0.2);
616
+
617
+ // Syntax highlighting
618
+ --highlight-bg: hsl(0, 2%, 11%);
619
+ --highlight-color: var(--black); // AAA 17.19
620
+ --highlight-comment: hsl(0, 0%, 60%); // AA 6.03
621
+ --highlight-punctuation: hsl(0, 0%, 80%); // AAA 10.70
622
+ --highlight-namespace: hsl(@orange-h, 85%, 61.5%); // Custom orange AAA 7.05
623
+ --highlight-attribute: hsl(@powder-h + 2, 41.5%, 67%); // Custom powder blue AAA 7.63
624
+ --highlight-literal: hsl(@orange-h, 85%, 61.5%); // Custom orange AAA 7.05
625
+ --highlight-symbol: hsl(306, 43%, 69%); // Custom purple AAA 7.23
626
+ --highlight-keyword: hsl(@powder-h + 3, 41.5%, 67%); // Custom powder blue AAA 7.63
627
+ --highlight-variable: hsl(65.5, 39%, 57.5%);
628
+ --highlight-addition: var(--green-600); // AAA 8.21
629
+ --highlight-deletion: var(--red-700); // AA 5.51
630
+ }
631
+
632
+ .dark-themed-colors() {
633
+ // Reassemble as a single hsl value
634
+ --theme-primary-color: .assemble-color(theme-primary-color)[];
635
+
636
+ // Reassemble as a single hsl value
637
+ --theme-secondary-color: .assemble-color(theme-secondary-color)[];
638
+
639
+ // Primary Theming
640
+ --theme-primary-025: .native-darken-desaturate(theme-primary-color, 17, 82)[];
641
+ --theme-primary-050: .native-darken-desaturate(theme-primary-color, 15, 47)[];
642
+ --theme-primary-075: .native-darken-desaturate(theme-primary-color, 13, 39)[];
643
+ --theme-primary-100: .native-darken-desaturate(theme-primary-color, 11, 32)[];
644
+ --theme-primary-150: .native-darken-desaturate(theme-primary-color, 9, 23)[];
645
+ --theme-primary-200: .native-darken-desaturate(theme-primary-color, 7, 15)[];
646
+ --theme-primary-300: .native-darken-desaturate(theme-primary-color, 5, 7)[];
647
+ --theme-primary-350: var(--theme-primary-color);
648
+ --theme-primary-400: .native-tint(theme-primary-color, 21)[];
649
+ --theme-primary-500: .native-tint(theme-primary-color, 36)[];
650
+ --theme-primary-600: .native-tint(theme-primary-color, 51)[];
651
+ --theme-primary-700: .native-tint(theme-primary-color, 66)[];
652
+ --theme-primary-800: .native-tint(theme-primary-color, 81)[];
653
+ --theme-primary-900: .native-tint(theme-primary-color, 96)[];
654
+
655
+ // Secondary Theming
656
+ --theme-secondary-025: .native-darken-desaturate(theme-secondary-color, 17, 82)[];
657
+ --theme-secondary-050: .native-darken-desaturate(theme-secondary-color, 15, 47)[];
658
+ --theme-secondary-075: .native-darken-desaturate(theme-secondary-color, 13, 39)[];
659
+ --theme-secondary-100: .native-darken-desaturate(theme-secondary-color, 11, 32)[];
660
+ --theme-secondary-150: .native-darken-desaturate(theme-secondary-color, 9, 23)[];
661
+ --theme-secondary-200: .native-darken-desaturate(theme-secondary-color, 7, 15)[];
662
+ --theme-secondary-300: .native-darken-desaturate(theme-secondary-color, 5, 7)[];
663
+ --theme-secondary-350: var(--theme-secondary-color);
664
+ --theme-secondary-400: .native-tint(theme-secondary-color, 21)[];
665
+ --theme-secondary-500: .native-tint(theme-secondary-color, 36)[];
666
+ --theme-secondary-600: .native-tint(theme-secondary-color, 51)[];
667
+ --theme-secondary-700: .native-tint(theme-secondary-color, 66)[];
668
+ --theme-secondary-800: .native-tint(theme-secondary-color, 81)[];
669
+ --theme-secondary-900: .native-tint(theme-secondary-color, 96)[];
670
+
671
+ // Fades
672
+ --focus-ring: .native-fade(theme-secondary-color, 25)[];
673
+ }
674
+
675
+ // rules shared between .theme-dark and .theme-system w/ prefers-color-scheme: dark
676
+ .theme-dark-rules() {
677
+ .dark-colors();
678
+
679
+ &,
680
+ & .themed {
681
+ color: var(--theme-body-font-color);
682
+ .generate-themed-variables(theme-dark);
683
+ // add in the themed "native mixins", making sure to scope to the child .themed elements so they don't use the parent's values
684
+ .dark-themed-colors();
685
+ &:extend(.component-colors);
686
+ }
687
+ }
688
+
689
+ // -- High contrast modes
690
+ .light-highcontrast() {
691
+ --white: hsl(0, 0%, 100%);
692
+ --black: hsl(0, 0%, 0%);
693
+
694
+ // Black
695
+ --black-025: hsl(@black-h, @black-s, 97.5%);
696
+ --black-050: hsl(@black-h, @black-s, 95%);
697
+ --black-075: hsl(@black-h, @black-s, 92.5%);
698
+ --black-100: hsl(@black-h, @black-s, 90%);
699
+ --black-150: hsl(@black-h, @black-s, 87.5%);
700
+ --black-200: hsl(@black-h, @black-s, 85%);
701
+ --black-300: hsl(@black-h, @black-s, 35%);
702
+ --black-350: hsl(@black-h, @black-s, 32.5%);
703
+ --black-400: hsl(@black-h, @black-s, 30%);
704
+ --black-500: hsl(@black-h, @black-s, 25%);
705
+ --black-600: hsl(@black-h, @black-s, 20%);
706
+ --black-700: hsl(@black-h, @black-s, 15%);
707
+ --black-750: hsl(@black-h, @black-s, 10%);
708
+ --black-800: hsl(@black-h, @black-s, 5%);
709
+ --black-900: hsl(@black-h, @black-s, 0%);
710
+
711
+ // Orange
712
+ --orange-050: hsl(@orange-h, 100%, 97.5%);
713
+ --orange-100: hsl(@orange-h, 100%, 94%);
714
+ --orange-200: hsl(@orange-h, 100%, 88%);
715
+ --orange-300: hsl(@orange-h, 100%, 82%);
716
+ --orange-400: hsl(@orange-h, 100%, 34%);
717
+ --orange-500: hsl(@orange-h, 100%, 29%);
718
+ --orange-600: hsl(@orange-h, 100%, 24%);
719
+ --orange-700: hsl(@orange-h, 100%, 19%);
720
+ --orange-800: hsl(@orange-h, 100%, 13%);
721
+ --orange-900: hsl(@orange-h, 100%, 8%);
722
+
723
+ // Blue
724
+ --blue-050: hsl(@blue-h, 100%, 97.5%);
725
+ --blue-100: hsl(@blue-h, 100%, 95%);
726
+ --blue-200: hsl(@blue-h, 100%, 90%);
727
+ --blue-300: hsl(@blue-h, 100%, 85%);
728
+ --blue-400: hsl(@blue-h, 100%, 25%);
729
+ --blue-500: hsl(@blue-h, 100%, 20%);
730
+ --blue-600: hsl(@blue-h, 100%, 15%);
731
+ --blue-700: hsl(@blue-h, 100%, 10%);
732
+ --blue-800: hsl(@blue-h, 100%, 7.5%);
733
+ --blue-900: hsl(@blue-h, 100%, 5%);
734
+
735
+ // Powder
736
+ --powder-050: hsl(@powder-h, 100%, 97.5%);
737
+ --powder-100: hsl(@powder-h, 85%, 96%);
738
+ --powder-200: hsl(@powder-h, 75%, 92%);
739
+ --powder-300: hsl(@powder-h, 70%, 88%);
740
+ --powder-400: hsl(@powder-h, 55%, 28%);
741
+ --powder-500: hsl(@powder-h, 60%, 24%);
742
+ --powder-600: hsl(@powder-h, 70%, 20%);
743
+ --powder-700: hsl(@powder-h, 75%, 16%);
744
+ --powder-800: hsl(@powder-h, 75%, 12%);
745
+ --powder-900: hsl(@powder-h, 75%, 8%);
746
+
747
+ // Green
748
+ --green-025: hsl(@green-h, 100%, 97%);
749
+ --green-050: hsl(@green-h, 100%, 96%);
750
+ --green-100: hsl(@green-h, 100%, 94%);
751
+ --green-200: hsl(@green-h, 100%, 88%);
752
+ --green-300: hsl(@green-h, 100%, 82%);
753
+ --green-400: hsl(@green-h, 100%, 18%);
754
+ --green-500: hsl(@green-h, 100%, 15%);
755
+ --green-600: hsl(@green-h, 100%, 12%);
756
+ --green-700: hsl(@green-h, 100%, 9%);
757
+ --green-800: hsl(@green-h, 100%, 6%);
758
+ --green-900: hsl(@green-h, 100%, 3%);
759
+
760
+ // Yellow
761
+ --yellow-050: hsl(@yellow-h, 100%, 95%);
762
+ --yellow-100: hsl(@yellow-h, 100%, 92%);
763
+ --yellow-200: hsl(@yellow-h, 95%, 85%);
764
+ --yellow-300: hsl(@yellow-h, 95%, 78%);
765
+ --yellow-400: hsl(@yellow-h, 100%, 28%);
766
+ --yellow-500: hsl(@yellow-h, 100%, 26%);
767
+ --yellow-600: hsl(@yellow-h, 100%, 23%);
768
+ --yellow-700: hsl(@yellow-h, 100%, 19%);
769
+ --yellow-800: hsl(@yellow-h, 100%, 13%);
770
+ --yellow-900: hsl(@yellow-h, 100%, 7%);
771
+
772
+ // Red
773
+ --red-050: hsl(@red-h, 100%, 97.5%);
774
+ --red-100: hsl(@red-h, 100%, 95%);
775
+ --red-200: hsl(@red-h, 100%, 90%);
776
+ --red-300: hsl(@red-h, 100%, 85%);
777
+ --red-400: hsl(@red-h, 100%, 35%);
778
+ --red-500: hsl(@red-h, 100%, 29%);
779
+ --red-600: hsl(@red-h, 100%, 23%);
780
+ --red-700: hsl(@red-h, 100%, 17%);
781
+ --red-800: hsl(@red-h, 100%, 11%);
782
+ --red-900: hsl(@red-h, 100%, 7%);
783
+
784
+ // Gold
785
+ --gold: hsl(@gold-h, 100%, 50%);
786
+ --gold-lighter: hsl(@gold-h, 100%, 91%);
787
+ --gold-darker: hsl(@gold-h - 3, 100%, 20%);
788
+
789
+ // Silver
790
+ --silver: hsl(@silver-h, 6%, 72%);
791
+ --silver-lighter: hsl(@silver-h, 6%, 91%);
792
+ --silver-darker: hsl(@silver-h, 6%, 30%);
793
+
794
+ // Bronze
795
+ --bronze: hsl(@bronze-h, 38%, 65%);
796
+ --bronze-lighter: hsl(@bronze-h, 40%, 92%);
797
+ --bronze-darker: hsl(@bronze-h, 31%, 25%);
798
+
799
+ // Border colors
800
+ --bc-lightest: var(--black-400);
801
+ --bc-lighter: var(--black-400);
802
+ --bc-light: var(--black-400);
803
+ --bc-medium: var(--black-400);
804
+ --bc-dark: var(--black-700);
805
+ --bc-darker: var(--black-900);
806
+
807
+ // Font colors
808
+ --fc-dark: var(--black-900);
809
+ --fc-medium: var(--black-700);
810
+ --fc-light: var(--black-500);
811
+
812
+ // Focus rings
813
+ --focus-ring: fade(@blue-600, 90%);
814
+ --focus-ring-success: fade(@green-600, 90%);
815
+ --focus-ring-warning: fade(@yellow-600, 90%);
816
+ --focus-ring-error: fade(@red-600, 90%);
817
+ --focus-ring-muted: fade(@black-400, 95%);
818
+
819
+ // Shadows
820
+ --bs-sm: none;
821
+ --bs-md: none;
822
+ --bs-lg: none;
823
+ --bs-xl: none;
824
+
825
+ // Scrollbars
826
+ --scrollbar: var(--black);
827
+
828
+ // Syntax highlighting
829
+ --highlight-bg: hsl(0, 0%, 96.5%); // Between black-025 and black-050
830
+ --highlight-color: var(--black-750);
831
+ --highlight-comment: hsl(213, 7%, 33%); // Custom black
832
+ --highlight-punctuation: var(--black-600);
833
+ --highlight-namespace: hsl(16, 94%, 31%); // Custom orange
834
+ --highlight-attribute: hsl(215, 100%, 35%); // Custom blue
835
+ --highlight-literal: hsl(16, 94%, 31%); // Custom orange
836
+ --highlight-symbol: hsl(309, 45%, 31%); // Custom purple
837
+ --highlight-keyword: hsl(215, 100%, 35%); // Custom blue
838
+ --highlight-variable: hsl(88, 100%, 19%); // Custom green
839
+ --highlight-addition: var(--green-500);
840
+ --highlight-deletion: var(--red-500);
841
+
842
+ // High contrast theme override
843
+ &:extend(.highcontrast-themed-colors);
844
+ }
845
+
846
+ .dark-highcontrast() {
847
+ --white: hsl(0, 0%, 0%);
848
+ --black: hsl(0, 0%, 100%);
849
+
850
+ // Black
851
+ --black-025: hsl(@black-h, @black-s, 2.5%);
852
+ --black-050: hsl(@black-h, @black-s, 5%);
853
+ --black-075: hsl(@black-h, @black-s, 7.5%);
854
+ --black-100: hsl(@black-h, @black-s, 10%);
855
+ --black-150: hsl(@black-h, @black-s, 12.5%);
856
+ --black-200: hsl(@black-h, @black-s, 15%);
857
+ --black-300: hsl(@black-h, @black-s, 65%);
858
+ --black-350: hsl(@black-h, @black-s, 67.5%);
859
+ --black-400: hsl(@black-h, @black-s, 70%);
860
+ --black-500: hsl(@black-h, @black-s, 75%);
861
+ --black-600: hsl(@black-h, @black-s, 80%);
862
+ --black-700: hsl(@black-h, @black-s, 85%);
863
+ --black-750: hsl(@black-h, @black-s, 90%);
864
+ --black-800: hsl(@black-h, @black-s, 95%);
865
+ --black-900: hsl(@black-h, @black-s, 100%);
866
+
867
+ // Orange
868
+ --orange-050: hsl(@orange-h, 100%, 4%);
869
+ --orange-100: hsl(@orange-h, 100%, 8%);
870
+ --orange-200: hsl(@orange-h, 100%, 16%);
871
+ --orange-300: hsl(@orange-h, 100%, 24%);
872
+ --orange-400: hsl(@orange-h, 100%, 64%);
873
+ --orange-500: hsl(@orange-h, 100%, 71%);
874
+ --orange-600: hsl(@orange-h, 100%, 77%);
875
+ --orange-700: hsl(@orange-h, 100%, 82%);
876
+ --orange-800: hsl(@orange-h, 100%, 87%);
877
+ --orange-900: hsl(@orange-h, 100%, 91%);
878
+
879
+ // Blue
880
+ --blue-050: hsl(@blue-h, 100%, 4%);
881
+ --blue-100: hsl(@blue-h, 100%, 11%);
882
+ --blue-200: hsl(@blue-h, 100%, 18%);
883
+ --blue-300: hsl(@blue-h, 100%, 25%);
884
+ --blue-400: hsl(@blue-h, 100%, 75%);
885
+ --blue-500: hsl(@blue-h, 100%, 80%);
886
+ --blue-600: hsl(@blue-h, 100%, 85%);
887
+ --blue-700: hsl(@blue-h, 100%, 90%);
888
+ --blue-800: hsl(@blue-h, 100%, 92.5%);
889
+ --blue-900: hsl(@blue-h, 100%, 95%);
890
+
891
+ // Powder
892
+ --powder-050: hsl(@powder-h, 100%, 6%);
893
+ --powder-100: hsl(@powder-h, 90%, 8%);
894
+ --powder-200: hsl(@powder-h, 80%, 14%);
895
+ --powder-300: hsl(@powder-h, 60%, 20%);
896
+ --powder-400: hsl(@powder-h, 55%, 72%);
897
+ --powder-500: hsl(@powder-h, 60%, 76%);
898
+ --powder-600: hsl(@powder-h, 70%, 80%);
899
+ --powder-700: hsl(@powder-h, 75%, 84%);
900
+ --powder-800: hsl(@powder-h, 75%, 88%);
901
+ --powder-900: hsl(@powder-h, 75%, 92%);
902
+
903
+ // Green
904
+ --green-025: hsl(@green-h, 100%, 3%);
905
+ --green-050: hsl(@green-h, 100%, 4%);
906
+ --green-100: hsl(@green-h, 100%, 6%);
907
+ --green-200: hsl(@green-h, 100%, 12%);
908
+ --green-300: hsl(@green-h, 100%, 18%);
909
+ --green-400: hsl(@green-h, 100%, 65%);
910
+ --green-500: hsl(@green-h, 100%, 71%);
911
+ --green-600: hsl(@green-h, 100%, 77%);
912
+ --green-700: hsl(@green-h, 100%, 83%);
913
+ --green-800: hsl(@green-h, 100%, 89%);
914
+ --green-900: hsl(@green-h, 100%, 94%);
915
+
916
+ // Yellow
917
+ --yellow-050: hsl(@yellow-h, 100%, 4%);
918
+ --yellow-100: hsl(@yellow-h, 100%, 8%);
919
+ --yellow-200: hsl(@yellow-h, 95%, 16%);
920
+ --yellow-300: hsl(@yellow-h, 95%, 24%);
921
+ --yellow-400: hsl(@yellow-h, 100%, 55%);
922
+ --yellow-500: hsl(@yellow-h, 100%, 63%);
923
+ --yellow-600: hsl(@yellow-h, 100%, 71%);
924
+ --yellow-700: hsl(@yellow-h, 100%, 79%);
925
+ --yellow-800: hsl(@yellow-h, 100%, 87%);
926
+ --yellow-900: hsl(@yellow-h, 100%, 95%);
927
+
928
+ // Red
929
+ --red-050: hsl(@red-h, 100%, 4%);
930
+ --red-100: hsl(@red-h, 100%, 8%);
931
+ --red-200: hsl(@red-h, 100%, 16%);
932
+ --red-300: hsl(@red-h, 100%, 24%);
933
+ --red-400: hsl(@red-h, 100%, 70%);
934
+ --red-500: hsl(@red-h, 100%, 75%);
935
+ --red-600: hsl(@red-h, 100%, 80%);
936
+ --red-700: hsl(@red-h, 100%, 85%);
937
+ --red-800: hsl(@red-h, 100%, 90%);
938
+ --red-900: hsl(@red-h, 100%, 95%);
939
+
940
+ // Gold
941
+ --gold: hsl(@gold-h, 100%, 50%);
942
+ --gold-lighter: hsl(@gold-h - 3, 100%, 9%);
943
+ --gold-darker: hsl(@gold-h - 3, 100%, 80%);
944
+
945
+ // Silver
946
+ --silver: hsl(@silver-h, 6%, 72%);
947
+ --silver-lighter: hsl(@silver-h, 5%, 9%);
948
+ --silver-darker: hsl(@silver-h, 5%, 70%);
949
+
950
+ // Bronze
951
+ --bronze: hsl(@bronze-h, 38%, 65%);
952
+ --bronze-lighter: hsl(@bronze-h, 40%, 8%);
953
+ --bronze-darker: hsl(@bronze-h, 46.7%, 75%);
954
+
955
+ // Border colors
956
+ --bc-lightest: var(--black-400);
957
+ --bc-lighter: var(--black-400);
958
+ --bc-light: var(--black-400);
959
+ --bc-medium: var(--black-400);
960
+ --bc-dark: var(--black-700);
961
+ --bc-darker: var(--black-900);
962
+
963
+ // Focus rings
964
+ --focus-ring: fade(@blue-600, 90%);
965
+ --focus-ring-success: fade(@green-600, 90%);
966
+ --focus-ring-warning: fade(@yellow-600, 90%);
967
+ --focus-ring-error: fade(@red-600, 90%);
968
+ --focus-ring-muted: fade(@black-400, 95%);
969
+
970
+ // Font colors
971
+ --fc-dark: var(--black-900);
972
+ --fc-medium: var(--black-700);
973
+ --fc-light: var(--black-500);
974
+
975
+ // Shadows
976
+ --bs-sm: none;
977
+ --bs-md: none;
978
+ --bs-lg: none;
979
+ --bs-xl: none;
980
+
981
+ // Scrollbars
982
+ --scrollbar: var(--black);
983
+
984
+ // Syntax highlighting
985
+ --highlight-bg: hsl(0, 0%, 10%);
986
+ --highlight-color: hsl(0, 0%, 100%);
987
+ --highlight-comment: hsl(0, 0%, 99%); // Custom gray
988
+ --highlight-punctuation: hsl(0, 0%, 99%); // Custom gray
989
+ --highlight-namespace: hsl(36, 96%, 71%); // Custom orange
990
+ --highlight-attribute: hsl(200, 57%, 85%); // Custom blue
991
+ --highlight-literal: hsl(36, 96%, 71%); // Custom orange
992
+ --highlight-symbol: hsl(304, 39%, 85%); // Custom purple
993
+ --highlight-keyword: hsl(200, 57%, 85%); // Custom blue
994
+ --highlight-variable: hsl(62, 71%, 81%); // Custom green
995
+ --highlight-addition: var(--green-600);
996
+ --highlight-deletion: var(--red-700);
997
+
998
+ // High contrast theme override
999
+ &:extend(.highcontrast-themed-colors);
1000
+ }
1001
+
1002
+ .highcontrast-themed-colors {
1003
+ // Primary Theming
1004
+ --theme-primary-color: var(--orange-400);
1005
+ --theme-primary-025: var(--orange-050);
1006
+ --theme-primary-050: var(--orange-050);
1007
+ --theme-primary-075: var(--orange-050);
1008
+ --theme-primary-100: var(--orange-100);
1009
+ --theme-primary-150: var(--orange-100);
1010
+ --theme-primary-200: var(--orange-200);
1011
+ --theme-primary-300: var(--orange-300);
1012
+ --theme-primary-350: var(--orange-300);
1013
+ --theme-primary-400: var(--orange-400);
1014
+ --theme-primary-500: var(--orange-500);
1015
+ --theme-primary-600: var(--orange-600);
1016
+ --theme-primary-700: var(--orange-700);
1017
+ --theme-primary-800: var(--orange-800);
1018
+ --theme-primary-900: var(--orange-900);
1019
+
1020
+ // Secondary Theming
1021
+ --theme-secondary-color: var(--blue-400);
1022
+ --theme-secondary-025: var(--blue-050);
1023
+ --theme-secondary-050: var(--blue-050);
1024
+ --theme-secondary-075: var(--blue-050);
1025
+ --theme-secondary-100: var(--blue-100);
1026
+ --theme-secondary-150: var(--blue-100);
1027
+ --theme-secondary-200: var(--blue-200);
1028
+ --theme-secondary-300: var(--blue-300);
1029
+ --theme-secondary-350: var(--blue-300);
1030
+ --theme-secondary-400: var(--blue-400);
1031
+ --theme-secondary-500: var(--blue-500);
1032
+ --theme-secondary-600: var(--blue-600);
1033
+ --theme-secondary-700: var(--blue-700);
1034
+ --theme-secondary-800: var(--blue-800);
1035
+ --theme-secondary-900: var(--blue-900);
1036
+ }
1037
+
1038
+ :root {
1039
+ // specify the default colors in less, then deconstruct them
1040
+ // this keeps the hsl/rgb variables below in sync, but consumers will need to set each variable separately
1041
+ @defaultPrimaryColor: @orange;
1042
+ @defaultSecondaryColor: @blue;
1043
+ .generate-calculated-themed-variables(@defaultPrimaryColor, primary);
1044
+ .generate-calculated-themed-variables(@defaultSecondaryColor, secondary);
1045
+ }
1046
+
1047
+ // place component-colors on the body directly (instead of :root) so consumers can use the --theme-* variables
1048
+
1049
+ // Light mode
1050
+ body:not(.theme-dark),
1051
+ body.theme-dark .theme-light__forced,
1052
+ body.theme-system .theme-light__forced {
1053
+ .light-colors();
1054
+
1055
+ &,
1056
+ & .themed {
1057
+ color: var(--theme-body-font-color);
1058
+ .generate-themed-variables(theme-light);
1059
+ // add in the themed "native mixins", making sure to scope to the child .themed elements so they don't use the parent's values
1060
+ .light-themed-colors();
1061
+ &:extend(.component-colors);
1062
+ }
1063
+ }
1064
+
1065
+ // Dark mode
1066
+ body.theme-dark,
1067
+ body:not(.theme-dark) .theme-dark__forced {
1068
+ .theme-dark-rules();
1069
+ }
1070
+ body.theme-system {
1071
+ @media (prefers-color-scheme: dark) {
1072
+ .theme-dark-rules();
1073
+ }
1074
+ }
1075
+
1076
+ // High contrast mode (Light)
1077
+ body.theme-highcontrast:not(.theme-dark),
1078
+ body.theme-dark.theme-highcontrast .theme-light__forced,
1079
+ body.theme-system.theme-highcontrast .theme-light__forced {
1080
+ .light-highcontrast();
1081
+ }
1082
+
1083
+ // High contrast mode (Dark)
1084
+ body.theme-dark.theme-highcontrast,
1085
+ body.theme-highcontrast:not(.theme-dark) .theme-dark__forced {
1086
+ .dark-highcontrast();
1087
+ }
1088
+ body.theme-system.theme-highcontrast {
1089
+ @media (prefers-color-scheme: dark) {
1090
+ .dark-highcontrast();
1091
+ }
1092
+ }