@stackoverflow/stacks 0.70.0 → 0.73.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 (45) hide show
  1. package/README.md +1 -1
  2. package/dist/css/stacks.css +1742 -681
  3. package/dist/css/stacks.min.css +1 -1
  4. package/dist/js/stacks.js +167 -92
  5. package/dist/js/stacks.min.js +1 -1
  6. package/lib/css/atomic/_stacks-borders.less +18 -0
  7. package/lib/css/atomic/_stacks-flex.less +2 -7
  8. package/lib/css/atomic/_stacks-grid.less +2 -0
  9. package/lib/css/atomic/_stacks-misc.less +6 -2
  10. package/lib/css/atomic/_stacks-typography.less +23 -8
  11. package/lib/css/base/_stacks-configuration-dynamic.less +5 -15
  12. package/lib/css/components/_stacks-activity-indicator.less +26 -2
  13. package/lib/css/components/_stacks-avatars.less +9 -0
  14. package/lib/css/components/_stacks-badges.less +18 -6
  15. package/lib/css/components/_stacks-breadcrumbs.less +2 -0
  16. package/lib/css/components/_stacks-button-groups.less +11 -0
  17. package/lib/css/components/_stacks-buttons.less +111 -10
  18. package/lib/css/components/_stacks-cards.less +9 -13
  19. package/lib/css/components/_stacks-code-blocks.less +1 -1
  20. package/lib/css/components/_stacks-inputs.less +78 -9
  21. package/lib/css/components/_stacks-link-previews.less +7 -3
  22. package/lib/css/components/_stacks-links.less +25 -2
  23. package/lib/css/components/_stacks-menu.less +4 -4
  24. package/lib/css/components/_stacks-modals.less +1 -1
  25. package/lib/css/components/_stacks-navigation.less +18 -0
  26. package/lib/css/components/_stacks-notices.less +40 -3
  27. package/lib/css/components/_stacks-page-titles.less +1 -1
  28. package/lib/css/components/_stacks-pagination.less +4 -2
  29. package/lib/css/components/_stacks-popovers.less +22 -2
  30. package/lib/css/components/_stacks-post-summary.less +134 -3
  31. package/lib/css/components/_stacks-progress-bars.less +29 -6
  32. package/lib/css/components/_stacks-prose.less +16 -2
  33. package/lib/css/components/_stacks-tables.less +10 -6
  34. package/lib/css/components/_stacks-tags.less +22 -19
  35. package/lib/css/components/_stacks-toggle-switches.less +12 -0
  36. package/lib/css/components/_stacks-topbar.less +440 -0
  37. package/lib/css/components/_stacks-uploader.less +22 -0
  38. package/lib/css/components/_stacks-widget-static.less +15 -3
  39. package/lib/css/exports/_stacks-constants-colors.less +443 -35
  40. package/lib/css/exports/_stacks-constants-helpers.less +1 -2
  41. package/lib/css/exports/_stacks-mixins.less +26 -0
  42. package/lib/css/stacks-dynamic.less +0 -1
  43. package/lib/css/stacks-static.less +15 -0
  44. package/lib/ts/controllers/s-tooltip.ts +4 -0
  45. package/package.json +15 -12
@@ -143,23 +143,15 @@
143
143
  @bronze-lighter: hsl(@bronze-h, 40%, 92%);
144
144
  @bronze-darker: hsl(@bronze-h, 31%, 52%);
145
145
 
146
- // $ RINGS
147
- // ----------------------------------------------------------------------------
148
- @focus-ring: fade(@blue-500, 15%);
149
- @focus-ring-success: fade(@green-200, 40%);
150
- @focus-ring-warning: fade(@yellow-400, 40%);
151
- @focus-ring-error: fade(@red-600, 15%);
152
- @focus-ring-muted: fade(@black-800, 10%);
153
-
154
146
  // $ SHADOWS
155
147
  // ----------------------------------------------------------------------------
156
- @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);
157
- @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);
158
- @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);
148
+ @bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.05), 0 2px 8px hsla(0, 0%, 0%, 0.05);
149
+ @bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.06), 0 2px 6px hsla(0, 0%, 0%, 0.06), 0 3px 8px hsla(0, 0%, 0%, 0.09);
150
+ @bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.09), 0 3px 8px hsla(0, 0%, 0%, 0.09), 0 4px 13px hsla(0, 0%, 0%, 0.13);
159
151
 
160
152
  // $ SCROLLBARS
161
153
  // ----------------------------------------------------------------------------
162
- @scrollbar: hsla(0, 0, 0, 0.2);
154
+ @scrollbar: hsla(0, 0%, 0%, 0.2);
163
155
 
164
156
  // ============================================================================
165
157
  // $ CSS Variable Colors
@@ -201,7 +193,7 @@
201
193
  --theme-secondary-color-b: var(~"--@{theme}-secondary-color-b", var(--theme-base-secondary-color-b));
202
194
  }
203
195
 
204
- .component-colors() {
196
+ .component-colors {
205
197
  --theme-body-font-color: var(--black-800);
206
198
 
207
199
  // Links
@@ -219,9 +211,9 @@
219
211
  --theme-button-selected-background-color: var(--theme-secondary-150);
220
212
 
221
213
  // Button Primary
222
- --theme-button-primary-color: @white;
214
+ --theme-button-primary-color: var(--white);
223
215
  --theme-button-primary-background-color: var(--theme-secondary-400);
224
- --theme-button-primary-hover-color: @white;
216
+ --theme-button-primary-hover-color: var(--white);
225
217
  --theme-button-primary-hover-background-color: var(--theme-secondary-500);
226
218
  --theme-button-primary-active-background-color: var(--theme-secondary-700);
227
219
  --theme-button-primary-selected-color: var(--white);
@@ -243,6 +235,40 @@
243
235
  // Button Outline
244
236
  --theme-button-outlined-border-color: var(--theme-secondary-300);
245
237
  --theme-button-outlined-selected-border-color: var(--theme-secondary-400);
238
+
239
+ // Tags
240
+ --theme-tag-color: var(--theme-secondary-800);
241
+ --theme-tag-background-color: var(--theme-secondary-075);
242
+ --theme-tag-border-color: transparent;
243
+ --theme-tag-hover-color: var(--theme-secondary-900);
244
+ --theme-tag-hover-background-color: var(--theme-secondary-100);
245
+ --theme-tag-hover-border-color: transparent;
246
+
247
+ // Topbar
248
+ --theme-topbar-height: @su48;
249
+ --theme-topbar-background-color: var(--black-025);
250
+
251
+ // Topbar Search input
252
+ --theme-topbar-search-color: var(--black-700);
253
+ --theme-topbar-search-background: var(--white);
254
+ --theme-topbar-search-placeholder: var(--black-200);
255
+ --theme-topbar-search-border: var(--black-200);
256
+ --theme-topbar-search-border-focus: var(--blue-300);
257
+ --theme-topbar-search-shadow-focus: 0 0 0 @su4 var(--focus-ring);
258
+
259
+ // Topbar Search switcher
260
+ --theme-topbar-select-color: var(--black-700);
261
+ --theme-topbar-select-background: var(--black-075);
262
+
263
+ // Topbar items
264
+ --theme-topbar-item-color: var(--black-600);
265
+ --theme-topbar-item-color-hover: var(--black-800);
266
+ --theme-topbar-item-background-hover: var(--black-075);
267
+ --theme-topbar-item-color-current: var(--black);
268
+ --theme-topbar-item-border-current: var(--theme-primary-color);
269
+
270
+ // Topbar themed border accent
271
+ --theme-topbar-accent-border: 3px solid var(--theme-primary-color);
246
272
  }
247
273
 
248
274
  // -- Light mode
@@ -361,16 +387,24 @@
361
387
  --bronze-lighter: @bronze-lighter;
362
388
  --bronze-darker: @bronze-darker;
363
389
 
390
+ // Border colors
391
+ --bc-lightest: var(--black-025);
392
+ --bc-lighter: var(--black-050);
393
+ --bc-light: var(--black-075);
394
+ --bc-medium: var(--black-100);
395
+ --bc-dark: var(--black-150);
396
+ --bc-darker: var(--black-200);
397
+
364
398
  // Font colors
365
399
  --fc-dark: @black-900;
366
400
  --fc-medium: @black-700;
367
401
  --fc-light: @black-500;
368
402
 
369
403
  // Focus rings
370
- --focus-ring-success: @focus-ring-success;
371
- --focus-ring-warning: @focus-ring-warning;
372
- --focus-ring-error: @focus-ring-error;
373
- --focus-ring-muted: @focus-ring-muted;
404
+ --focus-ring-success: hsla(@green-h, 40%, 75%, 40%);
405
+ --focus-ring-warning: hsla(@yellow-h, 79%, 58%, 40%);
406
+ --focus-ring-error: hsla(@red-h, 62%, 47%, 15%);
407
+ --focus-ring-muted: hsla(@black-h, @black-s, 15%, 10%);
374
408
 
375
409
  // Shadows
376
410
  --bs-sm: @bs-sm;
@@ -378,11 +412,11 @@
378
412
  --bs-lg: @bs-lg;
379
413
 
380
414
  // Scrollbars
381
- --scrollbar: @scrollbar;
415
+ --scrollbar: hsla(0, 0, 0, 0.2);
382
416
 
383
417
  // Syntax highlighting
384
418
  --highlight-bg: hsl(0, 0%, 96.5%); // Between black-025 and black-050
385
- --highlight-color: @black-750; // AAA 11.78
419
+ --highlight-color: var(--black-750); // AAA 11.78
386
420
  --highlight-comment: hsl(@black-h, 8%, 43.5%); // ~black-500 AA 4.80
387
421
  --highlight-punctuation: var(--black-600); // AA 6.48
388
422
  --highlight-namespace: hsl(@orange-h, 99%, 36%); // Custom orange AA 4.51
@@ -391,8 +425,8 @@
391
425
  --highlight-symbol: hsl(306, 43%, 35%); // Custom purple AAA 7.30
392
426
  --highlight-keyword: hsl(@blue-h, 98.5%, 29%); // Custom blue AAA 7.07
393
427
  --highlight-variable: hsl(80, 80.5%, 26.5%); // Custom green AAA 7.25
394
- --highlight-addition: @green-700; // AA 5.59
395
- --highlight-deletion: @red-600; // AA 5.31
428
+ --highlight-addition: var(--green-700); // AA 5.59
429
+ --highlight-deletion: var(--red-600); // AA 5.31
396
430
  }
397
431
 
398
432
  .light-themed-colors() {
@@ -551,28 +585,36 @@
551
585
  --bronze-lighter: hsl(@bronze-h, 13%, 27%);
552
586
  --bronze-darker: @bronze-darker;
553
587
 
588
+ // Border colors
589
+ --bc-lightest: var(--black-025);
590
+ --bc-lighter: var(--black-050);
591
+ --bc-light: var(--black-075);
592
+ --bc-medium: var(--black-100);
593
+ --bc-dark: var(--black-150);
594
+ --bc-darker: var(--black-200);
595
+
554
596
  // Font colors
555
597
  --fc-dark: var(--black-900);
556
598
  --fc-medium: var(--black-700);
557
599
  --fc-light: var(--black-500);
558
600
 
559
601
  // Focus rings
560
- --focus-ring-success: fade(@green-200, 40%);
561
- --focus-ring-warning: fade(@yellow-400, 40%);
562
- --focus-ring-error: fade(@red-500, 30%);
563
- --focus-ring-muted: fade(@black-800, 10%);
602
+ --focus-ring-success: hsla(@green-h, 40%, 75%, 40%);
603
+ --focus-ring-warning: hsla(@yellow-h, 79%, 58%, 40%);
604
+ --focus-ring-error: hsla(@red-h, 62%, 52%, 30%);
605
+ --focus-ring-muted: hsla(@black-h, @black-s, 100%, 10%);
564
606
 
565
607
  // Shadows
566
- --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);
567
- --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);
568
- --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);
608
+ --bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.1), 0 1px 4px hsla(0, 0%, 0%, 0.1), 0 2px 8px hsla(0, 0%, 0%, 0.1);
609
+ --bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.11), 0 2px 6px hsla(0, 0%, 0%, 0.11), 0 3px 8px hsla(0, 0%, 0%, 0.14);
610
+ --bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.14), 0 3px 8px hsla(0, 0%, 0%, 0.14), 0 4px 13px hsla(0, 0%, 0%, 0.18);
569
611
 
570
612
  // Scrollbars
571
613
  --scrollbar: hsla(0, 0%, 100%, 0.2);
572
614
 
573
615
  // Syntax highlighting
574
616
  --highlight-bg: hsl(0, 2%, 11%);
575
- --highlight-color: @white; // AAA 17.19
617
+ --highlight-color: var(--black); // AAA 17.19
576
618
  --highlight-comment: hsl(0, 0%, 60%); // AA 6.03
577
619
  --highlight-punctuation: hsl(0, 0%, 80%); // AAA 10.70
578
620
  --highlight-namespace: hsl(@orange-h, 85%, 61.5%); // Custom orange AAA 7.05
@@ -643,10 +685,357 @@
643
685
  }
644
686
 
645
687
  & .themed {
646
- .component-colors();
688
+ &:extend(.component-colors);
647
689
  }
648
690
  }
649
691
 
692
+ // -- High contrast modes
693
+ .light-highcontrast() {
694
+ --white: hsl(0, 0%, 100%);
695
+ --black: hsl(0, 0%, 0%);
696
+
697
+ // Black
698
+ --black-025: hsl(@black-h, @black-s, 97.5%);
699
+ --black-050: hsl(@black-h, @black-s, 95%);
700
+ --black-075: hsl(@black-h, @black-s, 92.5%);
701
+ --black-100: hsl(@black-h, @black-s, 90%);
702
+ --black-150: hsl(@black-h, @black-s, 87.5%);
703
+ --black-200: hsl(@black-h, @black-s, 85%);
704
+ --black-300: hsl(@black-h, @black-s, 35%);
705
+ --black-350: hsl(@black-h, @black-s, 32.5%);
706
+ --black-400: hsl(@black-h, @black-s, 30%);
707
+ --black-500: hsl(@black-h, @black-s, 25%);
708
+ --black-600: hsl(@black-h, @black-s, 20%);
709
+ --black-700: hsl(@black-h, @black-s, 15%);
710
+ --black-750: hsl(@black-h, @black-s, 10%);
711
+ --black-800: hsl(@black-h, @black-s, 5%);
712
+ --black-900: hsl(@black-h, @black-s, 0%);
713
+
714
+ // Orange
715
+ --orange-050: hsl(@orange-h, 100%, 97.5%);
716
+ --orange-100: hsl(@orange-h, 100%, 94%);
717
+ --orange-200: hsl(@orange-h, 100%, 88%);
718
+ --orange-300: hsl(@orange-h, 100%, 82%);
719
+ --orange-400: hsl(@orange-h, 100%, 34%);
720
+ --orange-500: hsl(@orange-h, 100%, 29%);
721
+ --orange-600: hsl(@orange-h, 100%, 24%);
722
+ --orange-700: hsl(@orange-h, 100%, 19%);
723
+ --orange-800: hsl(@orange-h, 100%, 13%);
724
+ --orange-900: hsl(@orange-h, 100%, 8%);
725
+
726
+ // Blue
727
+ --blue-050: hsl(@blue-h, 100%, 97.5%);
728
+ --blue-100: hsl(@blue-h, 100%, 95%);
729
+ --blue-200: hsl(@blue-h, 100%, 90%);
730
+ --blue-300: hsl(@blue-h, 100%, 85%);
731
+ --blue-400: hsl(@blue-h, 100%, 25%);
732
+ --blue-500: hsl(@blue-h, 100%, 20%);
733
+ --blue-600: hsl(@blue-h, 100%, 15%);
734
+ --blue-700: hsl(@blue-h, 100%, 10%);
735
+ --blue-800: hsl(@blue-h, 100%, 7.5%);
736
+ --blue-900: hsl(@blue-h, 100%, 5%);
737
+
738
+ // Powder
739
+ --powder-050: hsl(@powder-h, 100%, 97.5%);
740
+ --powder-100: hsl(@powder-h, 85%, 96%);
741
+ --powder-200: hsl(@powder-h, 75%, 92%);
742
+ --powder-300: hsl(@powder-h, 70%, 88%);
743
+ --powder-400: hsl(@powder-h, 55%, 28%);
744
+ --powder-500: hsl(@powder-h, 60%, 24%);
745
+ --powder-600: hsl(@powder-h, 70%, 20%);
746
+ --powder-700: hsl(@powder-h, 75%, 16%);
747
+ --powder-800: hsl(@powder-h, 75%, 12%);
748
+ --powder-900: hsl(@powder-h, 75%, 8%);
749
+
750
+ // Green
751
+ --green-025: hsl(@green-h, 100%, 97%);
752
+ --green-050: hsl(@green-h, 100%, 96%);
753
+ --green-100: hsl(@green-h, 100%, 94%);
754
+ --green-200: hsl(@green-h, 100%, 88%);
755
+ --green-300: hsl(@green-h, 100%, 82%);
756
+ --green-400: hsl(@green-h, 100%, 18%);
757
+ --green-500: hsl(@green-h, 100%, 15%);
758
+ --green-600: hsl(@green-h, 100%, 12%);
759
+ --green-700: hsl(@green-h, 100%, 9%);
760
+ --green-800: hsl(@green-h, 100%, 6%);
761
+ --green-900: hsl(@green-h, 100%, 3%);
762
+
763
+ // Yellow
764
+ --yellow-050: hsl(@yellow-h, 100%, 95%);
765
+ --yellow-100: hsl(@yellow-h, 100%, 92%);
766
+ --yellow-200: hsl(@yellow-h, 95%, 85%);
767
+ --yellow-300: hsl(@yellow-h, 95%, 78%);
768
+ --yellow-400: hsl(@yellow-h, 100%, 28%);
769
+ --yellow-500: hsl(@yellow-h, 100%, 26%);
770
+ --yellow-600: hsl(@yellow-h, 100%, 23%);
771
+ --yellow-700: hsl(@yellow-h, 100%, 19%);
772
+ --yellow-800: hsl(@yellow-h, 100%, 13%);
773
+ --yellow-900: hsl(@yellow-h, 100%, 7%);
774
+
775
+ // Red
776
+ --red-050: hsl(@red-h, 100%, 97.5%);
777
+ --red-100: hsl(@red-h, 100%, 95%);
778
+ --red-200: hsl(@red-h, 100%, 90%);
779
+ --red-300: hsl(@red-h, 100%, 85%);
780
+ --red-400: hsl(@red-h, 100%, 35%);
781
+ --red-500: hsl(@red-h, 100%, 29%);
782
+ --red-600: hsl(@red-h, 100%, 23%);
783
+ --red-700: hsl(@red-h, 100%, 17%);
784
+ --red-800: hsl(@red-h, 100%, 11%);
785
+ --red-900: hsl(@red-h, 100%, 7%);
786
+
787
+ // Gold
788
+ --gold: hsl(@gold-h, 100%, 50%);
789
+ --gold-lighter: hsl(@gold-h, 100%, 91%);
790
+ --gold-darker: hsl(@gold-h - 3, 100%, 20%);
791
+
792
+ // Silver
793
+ --silver: hsl(@silver-h, 6%, 72%);
794
+ --silver-lighter: hsl(@silver-h, 6%, 91%);
795
+ --silver-darker: hsl(@silver-h, 6%, 30%);
796
+
797
+ // Bronze
798
+ --bronze: hsl(@bronze-h, 38%, 65%);
799
+ --bronze-lighter: hsl(@bronze-h, 40%, 92%);
800
+ --bronze-darker: hsl(@bronze-h, 31%, 25%);
801
+
802
+ // Border colors
803
+ --bc-lightest: var(--black-400);
804
+ --bc-lighter: var(--black-400);
805
+ --bc-light: var(--black-400);
806
+ --bc-medium: var(--black-400);
807
+ --bc-dark: var(--black-700);
808
+ --bc-darker: var(--black-900);
809
+
810
+ // Font colors
811
+ --fc-dark: var(--black-900);
812
+ --fc-medium: var(--black-700);
813
+ --fc-light: var(--black-500);
814
+
815
+ // Focus rings
816
+ --focus-ring: fade(@blue-600, 90%);
817
+ --focus-ring-success: fade(@green-600, 90%);
818
+ --focus-ring-warning: fade(@yellow-600, 90%);
819
+ --focus-ring-error: fade(@red-600, 90%);
820
+ --focus-ring-muted: fade(@black-400, 95%);
821
+
822
+ // Shadows
823
+ --bs-sm: none;
824
+ --bs-md: none;
825
+ --bs-lg: none;
826
+
827
+ // Scrollbars
828
+ --scrollbar: var(--black);
829
+
830
+ // Syntax highlighting
831
+ --highlight-bg: hsl(0, 0%, 96.5%); // Between black-025 and black-050
832
+ --highlight-color: var(--black-750);
833
+ --highlight-comment: hsl(213, 7%, 33%); // Custom black
834
+ --highlight-punctuation: var(--black-600);
835
+ --highlight-namespace: hsl(16, 94%, 31%); // Custom orange
836
+ --highlight-attribute: hsl(215, 100%, 35%); // Custom blue
837
+ --highlight-literal: hsl(16, 94%, 31%); // Custom orange
838
+ --highlight-symbol: hsl(309, 45%, 31%); // Custom purple
839
+ --highlight-keyword: hsl(215, 100%, 35%); // Custom blue
840
+ --highlight-variable: hsl(88, 100%, 19%); // Custom green
841
+ --highlight-addition: var(--green-500);
842
+ --highlight-deletion: var(--red-500);
843
+
844
+ // High contrast theme override
845
+ &:extend(.highcontrast-themed-colors);
846
+ }
847
+
848
+ .dark-highcontrast() {
849
+ --white: hsl(0, 0%, 0%);
850
+ --black: hsl(0, 0%, 100%);
851
+
852
+ // Black
853
+ --black-025: hsl(@black-h, @black-s, 2.5%);
854
+ --black-050: hsl(@black-h, @black-s, 5%);
855
+ --black-075: hsl(@black-h, @black-s, 7.5%);
856
+ --black-100: hsl(@black-h, @black-s, 10%);
857
+ --black-150: hsl(@black-h, @black-s, 12.5%);
858
+ --black-200: hsl(@black-h, @black-s, 15%);
859
+ --black-300: hsl(@black-h, @black-s, 65%);
860
+ --black-350: hsl(@black-h, @black-s, 67.5%);
861
+ --black-400: hsl(@black-h, @black-s, 70%);
862
+ --black-500: hsl(@black-h, @black-s, 75%);
863
+ --black-600: hsl(@black-h, @black-s, 80%);
864
+ --black-700: hsl(@black-h, @black-s, 85%);
865
+ --black-750: hsl(@black-h, @black-s, 90%);
866
+ --black-800: hsl(@black-h, @black-s, 95%);
867
+ --black-900: hsl(@black-h, @black-s, 100%);
868
+
869
+ // Orange
870
+ --orange-050: hsl(@orange-h, 100%, 4%);
871
+ --orange-100: hsl(@orange-h, 100%, 8%);
872
+ --orange-200: hsl(@orange-h, 100%, 16%);
873
+ --orange-300: hsl(@orange-h, 100%, 24%);
874
+ --orange-400: hsl(@orange-h, 100%, 64%);
875
+ --orange-500: hsl(@orange-h, 100%, 71%);
876
+ --orange-600: hsl(@orange-h, 100%, 77%);
877
+ --orange-700: hsl(@orange-h, 100%, 82%);
878
+ --orange-800: hsl(@orange-h, 100%, 87%);
879
+ --orange-900: hsl(@orange-h, 100%, 91%);
880
+
881
+ // Blue
882
+ --blue-050: hsl(@blue-h, 100%, 4%);
883
+ --blue-100: hsl(@blue-h, 100%, 11%);
884
+ --blue-200: hsl(@blue-h, 100%, 18%);
885
+ --blue-300: hsl(@blue-h, 100%, 25%);
886
+ --blue-400: hsl(@blue-h, 100%, 75%);
887
+ --blue-500: hsl(@blue-h, 100%, 80%);
888
+ --blue-600: hsl(@blue-h, 100%, 85%);
889
+ --blue-700: hsl(@blue-h, 100%, 90%);
890
+ --blue-800: hsl(@blue-h, 100%, 92.5%);
891
+ --blue-900: hsl(@blue-h, 100%, 95%);
892
+
893
+ // Powder
894
+ --powder-050: hsl(@powder-h, 100%, 6%);
895
+ --powder-100: hsl(@powder-h, 90%, 8%);
896
+ --powder-200: hsl(@powder-h, 80%, 14%);
897
+ --powder-300: hsl(@powder-h, 60%, 20%);
898
+ --powder-400: hsl(@powder-h, 55%, 72%);
899
+ --powder-500: hsl(@powder-h, 60%, 76%);
900
+ --powder-600: hsl(@powder-h, 70%, 80%);
901
+ --powder-700: hsl(@powder-h, 75%, 84%);
902
+ --powder-800: hsl(@powder-h, 75%, 88%);
903
+ --powder-900: hsl(@powder-h, 75%, 92%);
904
+
905
+ // Green
906
+ --green-025: hsl(@green-h, 100%, 3%);
907
+ --green-050: hsl(@green-h, 100%, 4%);
908
+ --green-100: hsl(@green-h, 100%, 6%);
909
+ --green-200: hsl(@green-h, 100%, 12%);
910
+ --green-300: hsl(@green-h, 100%, 18%);
911
+ --green-400: hsl(@green-h, 100%, 65%);
912
+ --green-500: hsl(@green-h, 100%, 71%);
913
+ --green-600: hsl(@green-h, 100%, 77%);
914
+ --green-700: hsl(@green-h, 100%, 83%);
915
+ --green-800: hsl(@green-h, 100%, 89%);
916
+ --green-900: hsl(@green-h, 100%, 94%);
917
+
918
+ // Yellow
919
+ --yellow-050: hsl(@yellow-h, 100%, 4%);
920
+ --yellow-100: hsl(@yellow-h, 100%, 8%);
921
+ --yellow-200: hsl(@yellow-h, 95%, 16%);
922
+ --yellow-300: hsl(@yellow-h, 95%, 24%);
923
+ --yellow-400: hsl(@yellow-h, 100%, 55%);
924
+ --yellow-500: hsl(@yellow-h, 100%, 63%);
925
+ --yellow-600: hsl(@yellow-h, 100%, 71%);
926
+ --yellow-700: hsl(@yellow-h, 100%, 79%);
927
+ --yellow-800: hsl(@yellow-h, 100%, 87%);
928
+ --yellow-900: hsl(@yellow-h, 100%, 95%);
929
+
930
+ // Red
931
+ --red-050: hsl(@red-h, 100%, 4%);
932
+ --red-100: hsl(@red-h, 100%, 8%);
933
+ --red-200: hsl(@red-h, 100%, 16%);
934
+ --red-300: hsl(@red-h, 100%, 24%);
935
+ --red-400: hsl(@red-h, 100%, 70%);
936
+ --red-500: hsl(@red-h, 100%, 75%);
937
+ --red-600: hsl(@red-h, 100%, 80%);
938
+ --red-700: hsl(@red-h, 100%, 85%);
939
+ --red-800: hsl(@red-h, 100%, 90%);
940
+ --red-900: hsl(@red-h, 100%, 95%);
941
+
942
+ // Gold
943
+ --gold: hsl(@gold-h, 100%, 50%);
944
+ --gold-lighter: hsl(@gold-h - 3, 100%, 9%);
945
+ --gold-darker: hsl(@gold-h - 3, 100%, 80%);
946
+
947
+ // Silver
948
+ --silver: hsl(@silver-h, 6%, 72%);
949
+ --silver-lighter: hsl(@silver-h, 5%, 9%);
950
+ --silver-darker: hsl(@silver-h, 5%, 70%);
951
+
952
+ // Bronze
953
+ --bronze: hsl(@bronze-h, 38%, 65%);
954
+ --bronze-lighter: hsl(@bronze-h, 40%, 8%);
955
+ --bronze-darker: hsl(@bronze-h, 46.7%, 75%);
956
+
957
+ // Border colors
958
+ --bc-lightest: var(--black-400);
959
+ --bc-lighter: var(--black-400);
960
+ --bc-light: var(--black-400);
961
+ --bc-medium: var(--black-400);
962
+ --bc-dark: var(--black-700);
963
+ --bc-darker: var(--black-900);
964
+
965
+ // Focus rings
966
+ --focus-ring: fade(@blue-600, 90%);
967
+ --focus-ring-success: fade(@green-600, 90%);
968
+ --focus-ring-warning: fade(@yellow-600, 90%);
969
+ --focus-ring-error: fade(@red-600, 90%);
970
+ --focus-ring-muted: fade(@black-400, 95%);
971
+
972
+ // Font colors
973
+ --fc-dark: var(--black-900);
974
+ --fc-medium: var(--black-700);
975
+ --fc-light: var(--black-500);
976
+
977
+ // Shadows
978
+ --bs-sm: none;
979
+ --bs-md: none;
980
+ --bs-lg: none;
981
+
982
+ // Scrollbars
983
+ --scrollbar: var(--black);
984
+
985
+ // Syntax highlighting
986
+ --highlight-bg: hsl(0, 0%, 10%);
987
+ --highlight-color: hsl(0, 0%, 100%);
988
+ --highlight-comment: hsl(0, 0%, 99%); // Custom gray
989
+ --highlight-punctuation: hsl(0, 0%, 99%); // Custom gray
990
+ --highlight-namespace: hsl(36, 96%, 71%); // Custom orange
991
+ --highlight-attribute: hsl(200, 57%, 85%); // Custom blue
992
+ --highlight-literal: hsl(36, 96%, 71%); // Custom orange
993
+ --highlight-symbol: hsl(304, 39%, 85%); // Custom purple
994
+ --highlight-keyword: hsl(200, 57%, 85%); // Custom blue
995
+ --highlight-variable: hsl(62, 71%, 81%); // Custom green
996
+ --highlight-addition: var(--green-600);
997
+ --highlight-deletion: var(--red-700);
998
+
999
+ // High contrast theme override
1000
+ &:extend(.highcontrast-themed-colors);
1001
+ }
1002
+
1003
+ .highcontrast-themed-colors {
1004
+ // Primary Theming
1005
+ --theme-primary-color: var(--orange-400);
1006
+ --theme-primary-025: var(--orange-050);
1007
+ --theme-primary-050: var(--orange-050);
1008
+ --theme-primary-075: var(--orange-050);
1009
+ --theme-primary-100: var(--orange-100);
1010
+ --theme-primary-150: var(--orange-100);
1011
+ --theme-primary-200: var(--orange-200);
1012
+ --theme-primary-300: var(--orange-300);
1013
+ --theme-primary-350: var(--orange-300);
1014
+ --theme-primary-400: var(--orange-400);
1015
+ --theme-primary-500: var(--orange-500);
1016
+ --theme-primary-600: var(--orange-600);
1017
+ --theme-primary-700: var(--orange-700);
1018
+ --theme-primary-800: var(--orange-800);
1019
+ --theme-primary-900: var(--orange-900);
1020
+
1021
+ // Secondary Theming
1022
+ --theme-secondary-color: var(--blue-400);
1023
+ --theme-secondary-025: var(--blue-050);
1024
+ --theme-secondary-050: var(--blue-050);
1025
+ --theme-secondary-075: var(--blue-050);
1026
+ --theme-secondary-100: var(--blue-100);
1027
+ --theme-secondary-150: var(--blue-100);
1028
+ --theme-secondary-200: var(--blue-200);
1029
+ --theme-secondary-300: var(--blue-300);
1030
+ --theme-secondary-350: var(--blue-300);
1031
+ --theme-secondary-400: var(--blue-400);
1032
+ --theme-secondary-500: var(--blue-500);
1033
+ --theme-secondary-600: var(--blue-600);
1034
+ --theme-secondary-700: var(--blue-700);
1035
+ --theme-secondary-800: var(--blue-800);
1036
+ --theme-secondary-900: var(--blue-900);
1037
+ }
1038
+
650
1039
  :root {
651
1040
  // specify the default colors in less, then deconstruct them
652
1041
  // this keeps the hsl/rgb variables below in sync, but consumers will need to set each variable separately
@@ -658,9 +1047,10 @@
658
1047
 
659
1048
  // place component-colors on the body directly (instead of :root) so consumers can use the --theme-* variables
660
1049
  body {
661
- .component-colors();
1050
+ &:extend(.component-colors);
662
1051
  }
663
1052
 
1053
+ // Light mode
664
1054
  body:not(.theme-dark),
665
1055
  body.theme-dark .theme-light__forced,
666
1056
  body.theme-system .theme-light__forced {
@@ -674,17 +1064,35 @@ body.theme-system .theme-light__forced {
674
1064
  }
675
1065
 
676
1066
  & .themed {
677
- .component-colors();
1067
+ &:extend(.component-colors);
678
1068
  }
679
1069
  }
680
1070
 
1071
+ // Dark mode
681
1072
  body.theme-dark,
682
1073
  body:not(.theme-dark) .theme-dark__forced {
683
1074
  .theme-dark-rules();
684
1075
  }
685
-
686
1076
  body.theme-system {
687
1077
  @media (prefers-color-scheme: dark) {
688
1078
  .theme-dark-rules();
689
1079
  }
690
1080
  }
1081
+
1082
+ // High contrast mode (Light)
1083
+ body.theme-highcontrast:not(.theme-dark),
1084
+ body.theme-dark.theme-highcontrast .theme-light__forced,
1085
+ body.theme-system.theme-highcontrast .theme-light__forced {
1086
+ .light-highcontrast();
1087
+ }
1088
+
1089
+ // High contrast mode (Dark)
1090
+ body.theme-dark.theme-highcontrast,
1091
+ body.theme-highcontrast:not(.theme-dark) .theme-dark__forced {
1092
+ .dark-highcontrast();
1093
+ }
1094
+ body.theme-system.theme-highcontrast {
1095
+ @media (prefers-color-scheme: dark) {
1096
+ .dark-highcontrast();
1097
+ }
1098
+ }
@@ -52,6 +52,7 @@
52
52
  // ============================================================================
53
53
  // $ SPACING UNITS (su-)
54
54
  // ----------------------------------------------------------------------------
55
+ @su1: 1px;
55
56
  @su2: 2px;
56
57
  @su4: 4px;
57
58
  @su6: 6px;
@@ -126,14 +127,12 @@
126
127
  // Hide focus styles if they're not needed, for example,
127
128
  // when an element receives focus via the mouse.
128
129
  &:focus:not(:focus-visible) {
129
- color: inherit;
130
130
  outline: none;
131
131
  box-shadow: none;
132
132
  }
133
133
 
134
134
  // Show focus styles on keyboard focus.
135
135
  &:focus-visible {
136
- color: inherit;
137
136
  outline: none;
138
137
  box-shadow: 0 0 0 @su4 var(--focus-ring-muted);
139
138
  }
@@ -44,6 +44,32 @@
44
44
  }
45
45
  }
46
46
 
47
+ // ===========================================================================
48
+ // -- HIGHCONTRAST
49
+ // .highcontrast-mode renders a high contrast mode override for .theme-highcontrast
50
+ //
51
+ // Usage example:
52
+ //
53
+ // .highcontrast-mode({ background-color: var(--black-100); });
54
+ //
55
+ // ---------------------------------------------------------------------------
56
+
57
+ .highcontrast-mode(@rules) {
58
+ body.theme-highcontrast & {
59
+ @rules();
60
+ }
61
+ }
62
+
63
+ .highcontrast-dark-mode(@rules) {
64
+ body.theme-highcontrast.theme-system & {
65
+ @media (prefers-color-scheme: dark) {
66
+ @rules();
67
+ }
68
+ }
69
+ body.theme-highcontrast.theme-dark & {
70
+ @rules();
71
+ }
72
+ }
47
73
 
48
74
  // ===========================================================================
49
75
  // -- APPEARANCE
@@ -22,7 +22,6 @@
22
22
  @import "components/_stacks-buttons.less";
23
23
  @import "components/_stacks-links.less";
24
24
  @import "components/_stacks-link-previews.less";
25
- @import "components/_stacks-navigation.less";
26
25
  @import "components/_stacks-notices.less";
27
26
  @import "components/_stacks-tags.less";
28
27
  @import "components/_stacks-pagination.less";
@@ -29,6 +29,7 @@
29
29
  @import "components/_stacks-inputs.less";
30
30
  @import "components/_stacks-menu.less";
31
31
  @import "components/_stacks-modals.less";
32
+ @import "components/_stacks-navigation.less";
32
33
  @import "components/_stacks-page-titles.less";
33
34
  @import "components/_stacks-popovers.less";
34
35
  @import "components/_stacks-post-summary.less";
@@ -37,6 +38,7 @@
37
38
  @import "components/_stacks-spinner.less";
38
39
  @import "components/_stacks-tables.less";
39
40
  @import "components/_stacks-toggle-switches.less";
41
+ @import "components/_stacks-topbar.less";
40
42
  @import "components/_stacks-uploader.less";
41
43
  @import "components/_stacks-user-cards.less";
42
44
  @import "components/_stacks-widget-static.less";
@@ -64,6 +66,19 @@
64
66
  #stacks-internals #screen-sm({
65
67
  #stacks-internals-collect-small();
66
68
  });
69
+
70
+ // We need printing styles to be last so they can override all other styles.
71
+ .print\:d-block {
72
+ @media print {
73
+ display: block !important;
74
+ }
75
+ }
76
+
77
+ .print\:d-none {
78
+ @media print {
79
+ display: none !important;
80
+ }
81
+ }
67
82
  /* stylelint-enable */
68
83
 
69
84
  // -- CONFIG