@stackoverflow/stacks 1.10.3 → 2.0.0-rc.1

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