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