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