@stackoverflow/stacks 0.75.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controllers/index.d.ts +7 -0
- package/dist/controllers/s-expandable-control.d.ts +17 -0
- package/dist/controllers/s-modal.d.ts +97 -0
- package/dist/controllers/s-navigation-tablist.d.ts +36 -0
- package/dist/controllers/s-popover.d.ts +155 -0
- package/dist/controllers/s-table.d.ts +8 -0
- package/dist/controllers/s-tooltip.d.ts +82 -0
- package/dist/controllers/s-uploader.d.ts +48 -0
- package/dist/css/stacks.css +4379 -2660
- package/dist/css/stacks.min.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/js/stacks.js +6026 -5403
- package/dist/js/stacks.min.js +1 -1
- package/dist/stacks.d.ts +21 -0
- package/lib/css/atomic/{_stacks-borders.less → borders.less} +30 -30
- package/lib/css/atomic/{_stacks-colors.less → colors.less} +0 -0
- package/lib/css/atomic/{_stacks-flex.less → flex.less} +14 -13
- package/lib/css/atomic/{_stacks-grid.less → grid.less} +12 -11
- package/lib/css/atomic/{_stacks-misc.less → misc.less} +22 -22
- package/lib/css/atomic/spacing.less +314 -0
- package/lib/css/atomic/{_stacks-typography.less → typography.less} +29 -29
- package/lib/css/atomic/width-height.less +194 -0
- package/lib/css/base/{_stacks-body.less → body.less} +3 -5
- package/lib/css/base/{_stacks-configuration-static.less → configuration-static.less} +3 -1
- package/lib/css/base/{_stacks-icons.less → icons.less} +0 -0
- package/lib/css/base/{_stacks-internals.less → internals.less} +0 -10
- package/lib/css/base/{_stacks-reset-meyer.less → reset-meyer.less} +0 -0
- package/lib/css/base/{_stacks-reset-normalize.less → reset-normalize.less} +0 -0
- package/lib/css/base/{_stacks-reset.less → reset.less} +2 -2
- package/lib/css/components/{_stacks-activity-indicator.less → activity-indicator.less} +9 -9
- package/lib/css/components/{_stacks-avatars.less → avatars.less} +40 -40
- package/lib/css/components/{_stacks-badges.less → badges.less} +11 -11
- package/lib/css/components/{_stacks-banners.less → banners.less} +5 -6
- package/lib/css/components/{_stacks-blank-states.less → blank-states.less} +2 -2
- package/lib/css/components/{_stacks-breadcrumbs.less → breadcrumbs.less} +7 -7
- package/lib/css/components/{_stacks-button-groups.less → button-groups.less} +2 -2
- package/lib/css/components/{_stacks-buttons.less → buttons.less} +77 -72
- package/lib/css/components/{_stacks-cards.less → cards.less} +2 -2
- package/lib/css/components/{_stacks-code-blocks.less → code-blocks.less} +8 -8
- package/lib/css/components/{_stacks-collapsible.less → collapsible.less} +0 -0
- package/lib/css/components/{_stacks-inputs.less → inputs.less} +41 -41
- package/lib/css/components/{_stacks-link-previews.less → link-previews.less} +17 -17
- package/lib/css/components/{_stacks-links.less → links.less} +4 -4
- package/lib/css/components/{_stacks-menu.less → menu.less} +5 -5
- package/lib/css/components/{_stacks-modals.less → modals.less} +20 -20
- package/lib/css/components/{_stacks-navigation.less → navigation.less} +12 -12
- package/lib/css/components/{_stacks-notices.less → notices.less} +12 -12
- package/lib/css/components/{_stacks-page-titles.less → page-titles.less} +9 -9
- package/lib/css/components/{_stacks-pagination.less → pagination.less} +8 -8
- package/lib/css/components/{_stacks-popovers.less → popovers.less} +17 -17
- package/lib/css/components/{_stacks-post-summary.less → post-summary.less} +35 -35
- package/lib/css/components/{_stacks-progress-bars.less → progress-bars.less} +29 -30
- package/lib/css/components/{_stacks-prose.less → prose.less} +31 -31
- package/lib/css/components/{_stacks-spinner.less → spinner.less} +14 -14
- package/lib/css/components/{_stacks-tables.less → tables.less} +10 -10
- package/lib/css/components/{_stacks-tags.less → tags.less} +33 -41
- package/lib/css/components/{_stacks-toggle-switches.less → toggle-switches.less} +5 -5
- package/lib/css/components/{_stacks-topbar.less → topbar.less} +27 -40
- package/lib/css/components/{_stacks-uploader.less → uploader.less} +18 -18
- package/lib/css/components/{_stacks-user-cards.less → user-cards.less} +14 -14
- package/lib/css/components/{_stacks-widget-dynamic.less → widget-dynamic.less} +1 -1
- package/lib/css/components/{_stacks-widget-static.less → widget-static.less} +39 -38
- package/lib/css/exports/{_stacks-constants-colors.less → constants-colors.less} +10 -30
- package/lib/css/exports/constants-helpers.less +108 -0
- package/lib/css/exports/constants-type.less +153 -0
- package/lib/css/exports/{_stacks-exports.less → exports.less} +4 -4
- package/lib/css/exports/{_stacks-mixins.less → mixins.less} +18 -1
- package/lib/css/stacks-dynamic.less +12 -13
- package/lib/css/stacks-static.less +38 -38
- package/lib/ts/controllers/index.ts +8 -0
- package/lib/ts/controllers/s-expandable-control.ts +163 -164
- package/lib/ts/controllers/s-modal.ts +259 -261
- package/lib/ts/controllers/s-navigation-tablist.ts +96 -97
- package/lib/ts/controllers/s-popover.ts +438 -440
- package/lib/ts/controllers/s-table.ts +203 -203
- package/lib/ts/controllers/s-tooltip.ts +195 -196
- package/lib/ts/controllers/s-uploader.ts +162 -164
- package/lib/ts/index.ts +20 -0
- package/lib/ts/stacks.ts +73 -68
- package/lib/tsconfig.json +8 -6
- package/package.json +40 -24
- package/dist/css/stacks-flexgrid-shim.min.css +0 -1
- package/lib/css/atomic/_stacks-spacing.less +0 -168
- package/lib/css/atomic/_stacks-width-height.less +0 -195
- package/lib/css/base/_stacks-configuration-dynamic.less +0 -106
- package/lib/css/exports/_stacks-constants-helpers.less +0 -139
- package/lib/css/exports/_stacks-constants-type.less +0 -91
- package/lib/ts/finalize.ts +0 -1
- package/lib/ts/stimulus.d.ts +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import (reference) "./
|
|
1
|
+
@import (reference) "./mixins.less";
|
|
2
2
|
|
|
3
3
|
//
|
|
4
4
|
// STACK OVERFLOW
|
|
@@ -145,13 +145,6 @@
|
|
|
145
145
|
@bronze-lighter: hsl(@bronze-h, 40%, 92%);
|
|
146
146
|
@bronze-darker: hsl(@bronze-h, 31%, 52%);
|
|
147
147
|
|
|
148
|
-
// $ SHADOWS
|
|
149
|
-
// ----------------------------------------------------------------------------
|
|
150
|
-
@bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.05), 0 2px 8px hsla(0, 0%, 0%, 0.05);
|
|
151
|
-
@bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.06), 0 2px 6px hsla(0, 0%, 0%, 0.06), 0 3px 8px hsla(0, 0%, 0%, 0.09);
|
|
152
|
-
@bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.09), 0 3px 8px hsla(0, 0%, 0%, 0.09), 0 4px 13px hsla(0, 0%, 0%, 0.13);
|
|
153
|
-
@bs-xl: 0 10px 24px hsla(0, 0%, 0%, 0.05), 0 20px 48px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.1);
|
|
154
|
-
|
|
155
148
|
// $ SCROLLBARS
|
|
156
149
|
// ----------------------------------------------------------------------------
|
|
157
150
|
@scrollbar: hsla(0, 0%, 0%, 0.2);
|
|
@@ -198,7 +191,7 @@
|
|
|
198
191
|
|
|
199
192
|
.component-colors {
|
|
200
193
|
--theme-body-font-color: var(--black-800);
|
|
201
|
-
|
|
194
|
+
--theme-background-color: var(--white);
|
|
202
195
|
// Links
|
|
203
196
|
--theme-link-color: var(--theme-secondary-400);
|
|
204
197
|
--theme-link-color-hover: var(--theme-secondary-350);
|
|
@@ -248,7 +241,7 @@
|
|
|
248
241
|
--theme-tag-hover-border-color: transparent;
|
|
249
242
|
|
|
250
243
|
// Topbar
|
|
251
|
-
--theme-topbar-height:
|
|
244
|
+
--theme-topbar-height: var(--su-static48);
|
|
252
245
|
--theme-topbar-background-color: var(--black-025);
|
|
253
246
|
|
|
254
247
|
// Topbar Search input
|
|
@@ -257,7 +250,7 @@
|
|
|
257
250
|
--theme-topbar-search-placeholder: var(--black-200);
|
|
258
251
|
--theme-topbar-search-border: var(--black-200);
|
|
259
252
|
--theme-topbar-search-border-focus: var(--blue-300);
|
|
260
|
-
--theme-topbar-search-shadow-focus: 0 0 0
|
|
253
|
+
--theme-topbar-search-shadow-focus: 0 0 0 var(--su-static4) var(--focus-ring);
|
|
261
254
|
|
|
262
255
|
// Topbar Search switcher
|
|
263
256
|
--theme-topbar-select-color: var(--black-700);
|
|
@@ -417,10 +410,10 @@
|
|
|
417
410
|
--focus-ring-muted: hsla(@black-h, @black-s, 15%, 10%);
|
|
418
411
|
|
|
419
412
|
// Shadows
|
|
420
|
-
--bs-sm:
|
|
421
|
-
--bs-md:
|
|
422
|
-
--bs-lg:
|
|
423
|
-
--bs-xl:
|
|
413
|
+
--bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.05), 0 2px 8px hsla(0, 0%, 0%, 0.05);
|
|
414
|
+
--bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.06), 0 2px 6px hsla(0, 0%, 0%, 0.06), 0 3px 8px hsla(0, 0%, 0%, 0.09);
|
|
415
|
+
--bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.09), 0 3px 8px hsla(0, 0%, 0%, 0.09), 0 4px 13px hsla(0, 0%, 0%, 0.13);
|
|
416
|
+
--bs-xl: 0 10px 24px hsla(0, 0%, 0%, 0.05), 0 20px 48px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.1);
|
|
424
417
|
|
|
425
418
|
// Scrollbars
|
|
426
419
|
--scrollbar: hsla(0, 0, 0, 0.2);
|
|
@@ -481,9 +474,6 @@
|
|
|
481
474
|
|
|
482
475
|
// Fades
|
|
483
476
|
--focus-ring: .native-fade(theme-secondary-color, 15)[];
|
|
484
|
-
|
|
485
|
-
// TODO
|
|
486
|
-
--theme-body-font-color: var(--black-800);
|
|
487
477
|
}
|
|
488
478
|
|
|
489
479
|
// -- Dark mode
|
|
@@ -680,9 +670,6 @@
|
|
|
680
670
|
|
|
681
671
|
// Fades
|
|
682
672
|
--focus-ring: .native-fade(theme-secondary-color, 25)[];
|
|
683
|
-
|
|
684
|
-
// TODO
|
|
685
|
-
--theme-body-font-color: var(--black-800);
|
|
686
673
|
}
|
|
687
674
|
|
|
688
675
|
// rules shared between .theme-dark and .theme-system w/ prefers-color-scheme: dark
|
|
@@ -691,12 +678,10 @@
|
|
|
691
678
|
|
|
692
679
|
&,
|
|
693
680
|
& .themed {
|
|
681
|
+
color: var(--theme-body-font-color);
|
|
694
682
|
.generate-themed-variables(theme-dark);
|
|
695
683
|
// add in the themed "native mixins", making sure to scope to the child .themed elements so they don't use the parent's values
|
|
696
684
|
.dark-themed-colors();
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
& .themed {
|
|
700
685
|
&:extend(.component-colors);
|
|
701
686
|
}
|
|
702
687
|
}
|
|
@@ -1060,9 +1045,6 @@
|
|
|
1060
1045
|
}
|
|
1061
1046
|
|
|
1062
1047
|
// place component-colors on the body directly (instead of :root) so consumers can use the --theme-* variables
|
|
1063
|
-
body {
|
|
1064
|
-
&:extend(.component-colors);
|
|
1065
|
-
}
|
|
1066
1048
|
|
|
1067
1049
|
// Light mode
|
|
1068
1050
|
body:not(.theme-dark),
|
|
@@ -1072,12 +1054,10 @@ body.theme-system .theme-light__forced {
|
|
|
1072
1054
|
|
|
1073
1055
|
&,
|
|
1074
1056
|
& .themed {
|
|
1057
|
+
color: var(--theme-body-font-color);
|
|
1075
1058
|
.generate-themed-variables(theme-light);
|
|
1076
1059
|
// add in the themed "native mixins", making sure to scope to the child .themed elements so they don't use the parent's values
|
|
1077
1060
|
.light-themed-colors();
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
& .themed {
|
|
1081
1061
|
&:extend(.component-colors);
|
|
1082
1062
|
}
|
|
1083
1063
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
//
|
|
2
|
+
// STACK OVERFLOW
|
|
3
|
+
// CONSTANTS -- HELPERS
|
|
4
|
+
//
|
|
5
|
+
// This CSS comes from Stacks, our CSS & Pattern library for rapidly building
|
|
6
|
+
// Stack Overflow. For documentation of all these classes and how to contribute,
|
|
7
|
+
// visit https://stackoverflow.design/
|
|
8
|
+
//
|
|
9
|
+
// These are helper variables to quickly set values.
|
|
10
|
+
// These SHOULD NOT be reset.
|
|
11
|
+
//
|
|
12
|
+
// Table of Contents
|
|
13
|
+
// • z-index (zi-)
|
|
14
|
+
// • border-radius (br-)
|
|
15
|
+
// • box-shadow (bs-)
|
|
16
|
+
// • transition easings (te-)
|
|
17
|
+
//
|
|
18
|
+
body {
|
|
19
|
+
// Z-Index
|
|
20
|
+
--zi-hide: -1; // Hide something all the elements
|
|
21
|
+
--zi-base: 0; // Reset to 0
|
|
22
|
+
--zi-selected: 25; // Pop above siblings
|
|
23
|
+
--zi-active: 30; // Pop above selected siblings
|
|
24
|
+
--zi-dropdown: 1000; // Dropdowns
|
|
25
|
+
--zi-popovers: 2000; // Popovers, Popups, Autocompletes
|
|
26
|
+
--zi-tooltips: 3000; // Tooltips
|
|
27
|
+
--zi-banners: 4000; // Banners
|
|
28
|
+
--zi-navigation: 5000; // Navigation Bars
|
|
29
|
+
--zi-navigation-fixed: 5050; // Fixed navigation bars
|
|
30
|
+
--zi-modals-background: 8050; // Modals background
|
|
31
|
+
--zi-modals: 9000; // Modals
|
|
32
|
+
|
|
33
|
+
// Border Radius
|
|
34
|
+
--br-sm: 3px;
|
|
35
|
+
--br-md: 5px;
|
|
36
|
+
--br-lg: 7px;
|
|
37
|
+
--br-circle: 50%;
|
|
38
|
+
|
|
39
|
+
// Transition easings
|
|
40
|
+
--te-smooth-slow: cubic-bezier(0.25, 0.46, 0.45, 0.94); // easeOutQuad
|
|
41
|
+
--te-smooth: cubic-bezier(0.165, 0.84, 0.44, 1); // easeOutQuart
|
|
42
|
+
--te-smooth-quick: cubic-bezier(0.19, 1, 0.22, 1); // easeOutExpo
|
|
43
|
+
--te-back-out: cubic-bezier(0.175, 0.885, 0.32, 1.275); // easeOutBack
|
|
44
|
+
--te-back-in-out: cubic-bezier(0.68, -0.55, 0.265, 1.55); // easeInOutBack
|
|
45
|
+
--te-ease-in: cubic-bezier(0.47, 0, 0.745, 0.715); // easeIn
|
|
46
|
+
--te-ease-in-out: cubic-bezier(0.445, 0.05, 0.55, 0.95); // easeInOut
|
|
47
|
+
--te-ease-out: cubic-bezier(0.39, 0.575, 0.565, 1); // easeOut
|
|
48
|
+
|
|
49
|
+
--default-transition-duration: 0.1s;
|
|
50
|
+
--transition-time: var(--default-transition-duration);
|
|
51
|
+
|
|
52
|
+
// Sizing
|
|
53
|
+
--s-full: 97.2307692rem; // Based on a pixel size of 1264px;
|
|
54
|
+
--s-step: calc(var(--s-full) / 12);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ============================================================================
|
|
58
|
+
// $ RESPONSIVE BREAKPOINTS
|
|
59
|
+
// ----------------------------------------------------------------------------
|
|
60
|
+
@breakpoint-lg: 1264px;
|
|
61
|
+
@breakpoint-md: 980px;
|
|
62
|
+
@breakpoint-sm: 640px;
|
|
63
|
+
|
|
64
|
+
// ============================================================================
|
|
65
|
+
// $ SCROLLBAR STYLING
|
|
66
|
+
// ----------------------------------------------------------------------------
|
|
67
|
+
@scrollbar-styles: {
|
|
68
|
+
&::-webkit-scrollbar {
|
|
69
|
+
width: calc(var(--su-static12) - var(--su-static2));
|
|
70
|
+
height: calc(var(--su-static12) - var(--su-static2));
|
|
71
|
+
background-color: transparent;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&::-webkit-scrollbar-track {
|
|
75
|
+
border-radius: calc(var(--su-static12) - var(--su-static2));
|
|
76
|
+
background-color: transparent;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&::-webkit-scrollbar-thumb {
|
|
80
|
+
border-radius: calc(var(--su-static12) - var(--su-static2));
|
|
81
|
+
background-color: var(--scrollbar);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&::-webkit-scrollbar-corner {
|
|
85
|
+
background-color: transparent;
|
|
86
|
+
border-color: transparent;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
scrollbar-color: var(--scrollbar) transparent;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ============================================================================
|
|
93
|
+
// $ FOCUS STYLING
|
|
94
|
+
// ----------------------------------------------------------------------------
|
|
95
|
+
@focus-styles: {
|
|
96
|
+
// Hide focus styles if they're not needed, for example,
|
|
97
|
+
// when an element receives focus via the mouse.
|
|
98
|
+
&:focus:not(:focus-visible) {
|
|
99
|
+
outline: none;
|
|
100
|
+
box-shadow: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Show focus styles on keyboard focus.
|
|
104
|
+
&:focus-visible {
|
|
105
|
+
outline: none;
|
|
106
|
+
box-shadow: 0 0 0 var(--su-static4) var(--focus-ring-muted);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
//
|
|
2
|
+
// STACK OVERFLOW
|
|
3
|
+
// CONSTANTS -- TYPOGRAPHY
|
|
4
|
+
//
|
|
5
|
+
// This CSS comes from Stacks, our CSS & Pattern library for rapidly building
|
|
6
|
+
// Stack Overflow. For documentation of all these classes and how to contribute,
|
|
7
|
+
// visit https://stackoverflow.design/
|
|
8
|
+
//
|
|
9
|
+
// These are the Stacks type variables. These should be used in place of
|
|
10
|
+
// hard-coded values within CSS declarations.
|
|
11
|
+
//
|
|
12
|
+
//
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// $ FONT FAMILY (ff-)
|
|
15
|
+
// ----------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
// Add Segoe UI Adjusted as a font family, and adjust its baseline
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: "Segoe UI Adjusted";
|
|
20
|
+
src: local(Segoe UI);
|
|
21
|
+
ascent-override: 95%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Segoe UI is variable, but only in Windows 11, so add all the variants
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: "Segoe UI Adjusted";
|
|
27
|
+
src: local(Segoe UI Italic);
|
|
28
|
+
ascent-override: 95%;
|
|
29
|
+
font-style: italic;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@font-face {
|
|
33
|
+
font-family: "Segoe UI Adjusted";
|
|
34
|
+
src: local(Segoe UI Semibold);
|
|
35
|
+
ascent-override: 95%;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@font-face {
|
|
40
|
+
font-family: "Segoe UI Adjusted";
|
|
41
|
+
src: local(Segoe UI Semibold Italic);
|
|
42
|
+
ascent-override: 95%;
|
|
43
|
+
font-style: italic;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@font-face {
|
|
48
|
+
font-family: "Segoe UI Adjusted";
|
|
49
|
+
src: local(Segoe UI Bold);
|
|
50
|
+
ascent-override: 90%;
|
|
51
|
+
font-weight: 700;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@font-face {
|
|
55
|
+
font-family: "Segoe UI Adjusted";
|
|
56
|
+
src: local(Segoe UI Bold Italic);
|
|
57
|
+
ascent-override: 95%;
|
|
58
|
+
font-style: italic;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@font-face {
|
|
63
|
+
font-family: "Segoe UI Adjusted";
|
|
64
|
+
src: local(Segoe UI Black);
|
|
65
|
+
ascent-override: 95%;
|
|
66
|
+
font-weight: 800;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@font-face {
|
|
70
|
+
font-family: "Segoe UI Adjusted";
|
|
71
|
+
src: local(Segoe UI Black Italic);
|
|
72
|
+
ascent-override: 95%;
|
|
73
|
+
font-style: italic;
|
|
74
|
+
font-weight: 800;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// TODO remove font-family Less variables. Keeping them here for now for comments.
|
|
78
|
+
@ff-sans:
|
|
79
|
+
-apple-system, BlinkMacSystemFont, // San Francisco on macOS and iOS
|
|
80
|
+
"Segoe UI Adjusted", "Segoe UI", // Windows
|
|
81
|
+
"Liberation Sans", // Linux
|
|
82
|
+
sans-serif; // The final fallback for rendering in sans-serif.
|
|
83
|
+
@ff-serif: Georgia, Cambria, "Times New Roman", Times, serif;
|
|
84
|
+
@ff-mono:
|
|
85
|
+
ui-monospace, // San Francisco Mono on macOS and iOS
|
|
86
|
+
"Cascadia Mono", "Segoe UI Mono", // Newer Windows monospace fonts that are optionally installed. Most likely to be rendered in Consolas
|
|
87
|
+
"Liberation Mono", // Linux
|
|
88
|
+
Menlo, Monaco, Consolas, // A few sensible system font choices
|
|
89
|
+
monospace; // The final fallback for rendering in monospace.
|
|
90
|
+
|
|
91
|
+
html,
|
|
92
|
+
body {
|
|
93
|
+
--ff-sans: @ff-sans;
|
|
94
|
+
--ff-serif: @ff-serif;
|
|
95
|
+
--ff-mono: @ff-mono;
|
|
96
|
+
--theme-body-font-family: var(--ff-sans);
|
|
97
|
+
|
|
98
|
+
// ============================================================================
|
|
99
|
+
// $ FONT SIZES (fs-)
|
|
100
|
+
// Base font-size is 13px.
|
|
101
|
+
// ----------------------------------------------------------------------------
|
|
102
|
+
--fs-fine: 11px;
|
|
103
|
+
--fs-caption: 12px;
|
|
104
|
+
--fs-body1: 13px;
|
|
105
|
+
|
|
106
|
+
// Relative to the root element
|
|
107
|
+
--fs-body2: 1.153846154rem;
|
|
108
|
+
--fs-body3: 1.307692308rem;
|
|
109
|
+
--fs-subheading: 1.461538462rem;
|
|
110
|
+
--fs-title: 1.615384615rem;
|
|
111
|
+
--fs-headline1: 2.076923077rem;
|
|
112
|
+
--fs-headline2: 2.615384615rem;
|
|
113
|
+
--fs-display1: 3.307692308rem;
|
|
114
|
+
--fs-display2: 4.230769231rem;
|
|
115
|
+
--fs-display3: 5.307692308rem;
|
|
116
|
+
--fs-display4: 7.615384615rem;
|
|
117
|
+
|
|
118
|
+
// Relative to the parent
|
|
119
|
+
--fs-body2-relative: 1.153846154em;
|
|
120
|
+
--fs-body3-relative: 1.307692308em;
|
|
121
|
+
--fs-subheading-relative: 1.461538462em;
|
|
122
|
+
--fs-title-relative: 1.615384615em;
|
|
123
|
+
--fs-headline1-relative: 2.076923077em;
|
|
124
|
+
--fs-headline2-relative: 2.615384615em;
|
|
125
|
+
--fs-display1-relative: 3.307692308em;
|
|
126
|
+
--fs-display2-relative: 4.230769231em;
|
|
127
|
+
--fs-display3-relative: 5.307692308em;
|
|
128
|
+
--fs-display4-relative: 7.615384615em;
|
|
129
|
+
|
|
130
|
+
--fs-base: 13px;
|
|
131
|
+
|
|
132
|
+
// ============================================================================
|
|
133
|
+
// $ LINE HEIGHT (lh-)
|
|
134
|
+
// ----------------------------------------------------------------------------
|
|
135
|
+
// Need to remove the unit off the font-size to make line-height unitless
|
|
136
|
+
// FIXME this shouldn't be public. Find a way to use unitless `--fs-base`.
|
|
137
|
+
--stacks-internals-lh-unit: 13;
|
|
138
|
+
|
|
139
|
+
// Now the various line-height variables
|
|
140
|
+
--lh-xs: 1;
|
|
141
|
+
--lh-sm: calc((var(--stacks-internals-lh-unit) + 2) / var(--stacks-internals-lh-unit));
|
|
142
|
+
--lh-md: calc((var(--stacks-internals-lh-unit) + 4) / var(--stacks-internals-lh-unit));
|
|
143
|
+
--lh-lg: calc((var(--stacks-internals-lh-unit) + 8) / var(--stacks-internals-lh-unit));
|
|
144
|
+
--lh-xl: calc((var(--stacks-internals-lh-unit) + 12) / var(--stacks-internals-lh-unit));
|
|
145
|
+
--lh-xxl: 2;
|
|
146
|
+
|
|
147
|
+
--lh-base: var(--lh-md);
|
|
148
|
+
|
|
149
|
+
// Holdover line-heights from production. These are NOT to be used and
|
|
150
|
+
// need to be deprecated.
|
|
151
|
+
// ----------------------------------------------------------------------------
|
|
152
|
+
--lh-6: ((var(--stacks-internals-lh-unit) + 6) / var(--stacks-internals-lh-unit));
|
|
153
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// Wherein we establish a bunch of values to make our lives a lot easier.
|
|
10
10
|
//
|
|
11
11
|
// ============================================================================
|
|
12
|
-
@import "
|
|
13
|
-
@import "
|
|
14
|
-
@import "
|
|
15
|
-
@import "
|
|
12
|
+
@import "constants-type.less"; // Type styles, sizes, and line-heights
|
|
13
|
+
@import "constants-helpers.less"; // Border radius, z-index, spacing, transitions, etc
|
|
14
|
+
@import "constants-colors.less"; // Colors
|
|
15
|
+
@import "mixins.less";
|
|
@@ -19,6 +19,22 @@
|
|
|
19
19
|
&:after { clear: both; }
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// ============================================================================
|
|
23
|
+
// -- LIGHTMODE
|
|
24
|
+
// .light-mode-forced ensures light color scheme is used in .theme-light__forced
|
|
25
|
+
//
|
|
26
|
+
// .light-mode-forced({ color: var(--black-900) });
|
|
27
|
+
//
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
.light-mode-forced(@rules) {
|
|
31
|
+
.theme-light__forced &,
|
|
32
|
+
body.theme-system .theme-light__forced &,
|
|
33
|
+
body.theme-dark .theme-light__forced & {
|
|
34
|
+
@rules();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
22
38
|
// ===========================================================================
|
|
23
39
|
// -- DARKMODE
|
|
24
40
|
// .darkmode renders a dark mode override behind the
|
|
@@ -39,7 +55,8 @@
|
|
|
39
55
|
}
|
|
40
56
|
|
|
41
57
|
body.theme-dark &,
|
|
42
|
-
.theme-dark__forced
|
|
58
|
+
.theme-dark__forced &,
|
|
59
|
+
body.theme-system .theme-dark__forced & {
|
|
43
60
|
@rules();
|
|
44
61
|
}
|
|
45
62
|
}
|
|
@@ -15,22 +15,21 @@
|
|
|
15
15
|
// via variables.
|
|
16
16
|
// ----------------------------------------------------------------------------
|
|
17
17
|
// -- SET BASIC STYLES FOR BODY
|
|
18
|
-
@import "base/
|
|
18
|
+
@import "base/body.less";
|
|
19
19
|
|
|
20
20
|
// -- COMPONENTS
|
|
21
|
-
@import "components/
|
|
22
|
-
@import "components/
|
|
23
|
-
@import "components/
|
|
24
|
-
@import "components/
|
|
25
|
-
@import "components/
|
|
26
|
-
@import "components/
|
|
27
|
-
@import "components/
|
|
28
|
-
@import "components/
|
|
21
|
+
@import "components/banners.less";
|
|
22
|
+
@import "components/buttons.less";
|
|
23
|
+
@import "components/links.less";
|
|
24
|
+
@import "components/link-previews.less";
|
|
25
|
+
@import "components/notices.less";
|
|
26
|
+
@import "components/tags.less";
|
|
27
|
+
@import "components/pagination.less";
|
|
28
|
+
@import "components/widget-dynamic.less";
|
|
29
29
|
|
|
30
30
|
// -- LESS CONSTANTS AND MIXINS
|
|
31
|
-
@import "exports/
|
|
31
|
+
@import "exports/exports.less";
|
|
32
32
|
|
|
33
33
|
// -- CONFIG
|
|
34
|
-
@import "base/
|
|
35
|
-
@import "base/
|
|
36
|
-
@import "base/_stacks-internals.less";
|
|
34
|
+
@import "base/configuration-static.less";
|
|
35
|
+
@import "base/internals.less";
|
|
@@ -13,48 +13,48 @@
|
|
|
13
13
|
// The following items are elements which we DO NOT allow communities
|
|
14
14
|
// to modify via variables.
|
|
15
15
|
// ----------------------------------------------------------------------------
|
|
16
|
-
@import "base/
|
|
17
|
-
@import "base/
|
|
16
|
+
@import "base/reset.less";
|
|
17
|
+
@import "base/icons.less";
|
|
18
18
|
|
|
19
19
|
// -- COMPONENTS
|
|
20
|
-
@import "components/
|
|
21
|
-
@import "components/
|
|
22
|
-
@import "components/
|
|
23
|
-
@import "components/
|
|
24
|
-
@import "components/
|
|
25
|
-
@import "components/
|
|
26
|
-
@import "components/
|
|
27
|
-
@import "components/
|
|
28
|
-
@import "components/
|
|
29
|
-
@import "components/
|
|
30
|
-
@import "components/
|
|
31
|
-
@import "components/
|
|
32
|
-
@import "components/
|
|
33
|
-
@import "components/
|
|
34
|
-
@import "components/
|
|
35
|
-
@import "components/
|
|
36
|
-
@import "components/
|
|
37
|
-
@import "components/
|
|
38
|
-
@import "components/
|
|
39
|
-
@import "components/
|
|
40
|
-
@import "components/
|
|
41
|
-
@import "components/
|
|
42
|
-
@import "components/
|
|
43
|
-
@import "components/
|
|
44
|
-
@import "components/
|
|
20
|
+
@import "components/activity-indicator.less";
|
|
21
|
+
@import "components/avatars.less";
|
|
22
|
+
@import "components/badges.less";
|
|
23
|
+
@import "components/blank-states.less";
|
|
24
|
+
@import "components/breadcrumbs.less";
|
|
25
|
+
@import "components/button-groups.less";
|
|
26
|
+
@import "components/cards.less";
|
|
27
|
+
@import "components/code-blocks.less";
|
|
28
|
+
@import "components/collapsible.less";
|
|
29
|
+
@import "components/inputs.less";
|
|
30
|
+
@import "components/menu.less";
|
|
31
|
+
@import "components/modals.less";
|
|
32
|
+
@import "components/navigation.less";
|
|
33
|
+
@import "components/page-titles.less";
|
|
34
|
+
@import "components/popovers.less";
|
|
35
|
+
@import "components/post-summary.less";
|
|
36
|
+
@import "components/progress-bars.less";
|
|
37
|
+
@import "components/prose.less";
|
|
38
|
+
@import "components/spinner.less";
|
|
39
|
+
@import "components/tables.less";
|
|
40
|
+
@import "components/toggle-switches.less";
|
|
41
|
+
@import "components/topbar.less";
|
|
42
|
+
@import "components/uploader.less";
|
|
43
|
+
@import "components/user-cards.less";
|
|
44
|
+
@import "components/widget-static.less";
|
|
45
45
|
|
|
46
46
|
// -- LESS CONSTANTS AND MIXINS
|
|
47
|
-
@import "exports/
|
|
47
|
+
@import "exports/exports.less";
|
|
48
48
|
|
|
49
49
|
// -- ATOMIC CLASSES
|
|
50
|
-
@import "atomic/
|
|
51
|
-
@import "atomic/
|
|
52
|
-
@import "atomic/
|
|
53
|
-
@import "atomic/
|
|
54
|
-
@import "atomic/
|
|
55
|
-
@import "atomic/
|
|
56
|
-
@import "atomic/
|
|
57
|
-
@import "atomic/
|
|
50
|
+
@import "atomic/borders.less";
|
|
51
|
+
@import "atomic/colors.less";
|
|
52
|
+
@import "atomic/flex.less";
|
|
53
|
+
@import "atomic/grid.less";
|
|
54
|
+
@import "atomic/spacing.less";
|
|
55
|
+
@import "atomic/typography.less";
|
|
56
|
+
@import "atomic/misc.less";
|
|
57
|
+
@import "atomic/width-height.less";
|
|
58
58
|
|
|
59
59
|
/* stylelint-disable */
|
|
60
60
|
#stacks-internals #screen-lg({
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
/* stylelint-enable */
|
|
83
83
|
|
|
84
84
|
// -- CONFIG
|
|
85
|
-
@import "base/
|
|
86
|
-
@import "base/
|
|
85
|
+
@import "base/configuration-static.less";
|
|
86
|
+
@import "base/internals.less";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// export all controllers *with helpers* so they can be bulk re-exported by the package entry point
|
|
2
|
+
export { ExpandableController } from './s-expandable-control';
|
|
3
|
+
export { hideModal, ModalController, showModal } from './s-modal';
|
|
4
|
+
export { TabListController } from './s-navigation-tablist';
|
|
5
|
+
export { attachPopover, detachPopover, hidePopover, BasePopoverController, PopoverController, showPopover } from './s-popover';
|
|
6
|
+
export { TableController } from './s-table';
|
|
7
|
+
export { setTooltipHtml, setTooltipText, TooltipController } from './s-tooltip';
|
|
8
|
+
export { UploaderController } from './s-uploader';
|