@stackoverflow/stacks 0.75.0 → 0.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/LICENSE.MD +9 -9
  2. package/README.md +47 -47
  3. package/dist/controllers/index.d.ts +7 -0
  4. package/dist/controllers/s-expandable-control.d.ts +17 -0
  5. package/dist/controllers/s-modal.d.ts +97 -0
  6. package/dist/controllers/s-navigation-tablist.d.ts +36 -0
  7. package/dist/controllers/s-popover.d.ts +155 -0
  8. package/dist/controllers/s-table.d.ts +8 -0
  9. package/dist/controllers/s-tooltip.d.ts +82 -0
  10. package/dist/controllers/s-uploader.d.ts +48 -0
  11. package/dist/css/stacks.css +86 -53
  12. package/dist/css/stacks.min.css +1 -1
  13. package/dist/index.d.ts +3 -0
  14. package/dist/js/stacks.js +6128 -5505
  15. package/dist/js/stacks.min.js +1 -1
  16. package/dist/stacks.d.ts +21 -0
  17. package/lib/css/atomic/_stacks-borders.less +378 -378
  18. package/lib/css/atomic/_stacks-colors.less +209 -209
  19. package/lib/css/atomic/_stacks-flex.less +374 -374
  20. package/lib/css/atomic/_stacks-grid.less +174 -173
  21. package/lib/css/atomic/_stacks-misc.less +343 -343
  22. package/lib/css/atomic/_stacks-spacing.less +168 -168
  23. package/lib/css/atomic/_stacks-typography.less +273 -273
  24. package/lib/css/atomic/_stacks-width-height.less +195 -195
  25. package/lib/css/base/_stacks-body.less +44 -46
  26. package/lib/css/base/_stacks-configuration-static.less +59 -59
  27. package/lib/css/base/_stacks-icons.less +20 -20
  28. package/lib/css/base/_stacks-internals.less +220 -230
  29. package/lib/css/base/_stacks-reset-meyer.less +64 -64
  30. package/lib/css/base/_stacks-reset-normalize.less +449 -449
  31. package/lib/css/base/_stacks-reset.less +20 -20
  32. package/lib/css/components/_stacks-activity-indicator.less +45 -45
  33. package/lib/css/components/_stacks-avatars.less +189 -189
  34. package/lib/css/components/_stacks-badges.less +209 -209
  35. package/lib/css/components/_stacks-banners.less +80 -81
  36. package/lib/css/components/_stacks-blank-states.less +26 -26
  37. package/lib/css/components/_stacks-breadcrumbs.less +44 -44
  38. package/lib/css/components/_stacks-button-groups.less +104 -104
  39. package/lib/css/components/_stacks-buttons.less +658 -660
  40. package/lib/css/components/_stacks-cards.less +44 -44
  41. package/lib/css/components/_stacks-code-blocks.less +130 -130
  42. package/lib/css/components/_stacks-collapsible.less +104 -104
  43. package/lib/css/components/_stacks-inputs.less +728 -728
  44. package/lib/css/components/_stacks-link-previews.less +136 -136
  45. package/lib/css/components/_stacks-links.less +218 -218
  46. package/lib/css/components/_stacks-menu.less +47 -47
  47. package/lib/css/components/_stacks-modals.less +133 -133
  48. package/lib/css/components/_stacks-navigation.less +146 -146
  49. package/lib/css/components/_stacks-notices.less +233 -233
  50. package/lib/css/components/_stacks-page-titles.less +60 -60
  51. package/lib/css/components/_stacks-pagination.less +55 -55
  52. package/lib/css/components/_stacks-popovers.less +197 -197
  53. package/lib/css/components/_stacks-post-summary.less +425 -425
  54. package/lib/css/components/_stacks-progress-bars.less +331 -331
  55. package/lib/css/components/_stacks-prose.less +503 -503
  56. package/lib/css/components/_stacks-spinner.less +107 -107
  57. package/lib/css/components/_stacks-tables.less +341 -341
  58. package/lib/css/components/_stacks-tags.less +236 -244
  59. package/lib/css/components/_stacks-toggle-switches.less +144 -144
  60. package/lib/css/components/_stacks-topbar.less +425 -440
  61. package/lib/css/components/_stacks-uploader.less +210 -210
  62. package/lib/css/components/_stacks-user-cards.less +169 -169
  63. package/lib/css/components/_stacks-widget-dynamic.less +33 -33
  64. package/lib/css/components/_stacks-widget-static.less +272 -272
  65. package/lib/css/exports/_stacks-constants-colors.less +1112 -1112
  66. package/lib/css/exports/_stacks-constants-helpers.less +139 -139
  67. package/lib/css/exports/_stacks-constants-type.less +152 -91
  68. package/lib/css/exports/_stacks-exports.less +15 -15
  69. package/lib/css/exports/_stacks-mixins.less +220 -220
  70. package/lib/css/stacks-dynamic.less +35 -36
  71. package/lib/css/stacks-static.less +86 -86
  72. package/lib/ts/controllers/index.ts +8 -0
  73. package/lib/ts/controllers/s-expandable-control.ts +189 -190
  74. package/lib/ts/controllers/s-modal.ts +321 -323
  75. package/lib/ts/controllers/s-navigation-tablist.ts +118 -119
  76. package/lib/ts/controllers/s-popover.ts +547 -549
  77. package/lib/ts/controllers/s-table.ts +220 -220
  78. package/lib/ts/controllers/s-tooltip.ts +246 -247
  79. package/lib/ts/controllers/s-uploader.ts +172 -174
  80. package/lib/ts/index.ts +20 -0
  81. package/lib/ts/stacks.ts +88 -83
  82. package/lib/tsconfig.json +13 -11
  83. package/package.json +87 -71
  84. package/dist/css/stacks-flexgrid-shim.min.css +0 -1
  85. package/lib/css/base/_stacks-configuration-dynamic.less +0 -106
  86. package/lib/ts/finalize.ts +0 -1
  87. package/lib/ts/stimulus.d.ts +0 -4
@@ -1,139 +1,139 @@
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
- // • spacing units (su-)
17
- // • transition easings (te-)
18
- //
19
- // ============================================================================
20
- // $ Z-INDEX (zi-)
21
- // Used for a bird's eye view of components dependent on the z-axis.
22
- // Try to avoid customizing these.
23
- // ----------------------------------------------------------------------------
24
- @zi-hide: -1; // Hide something all the elements
25
- @zi-base: 0; // Reset to 0
26
- @zi-selected: 25; // Pop above siblings
27
- @zi-active: 30; // Pop above selected siblings
28
- @zi-dropdown: 1000; // Dropdowns
29
- @zi-popovers: 2000; // Popovers, Popups, Autocompletes
30
- @zi-tooltips: 3000; // Tooltips
31
- @zi-banners: 4000; // Banners
32
- @zi-navigation: 5000; // Navigation Bars
33
- @zi-navigation-fixed: 5050; // Fixed navigation bars
34
- @zi-modals: 9000; // Modals
35
- @zi-modals-background: @zi-modals - 50;
36
-
37
- // ============================================================================
38
- // $ RESPONSIVE BREAKPOINTS
39
- // ----------------------------------------------------------------------------
40
- @breakpoint-lg: 1264px;
41
- @breakpoint-md: 980px;
42
- @breakpoint-sm: 640px;
43
-
44
- // ============================================================================
45
- // $ BORDER RADIUS (br-)
46
- // ----------------------------------------------------------------------------
47
- @br-sm: 3px;
48
- @br-md: 5px;
49
- @br-lg: 7px;
50
- @br-circle: 50%;
51
-
52
- // ============================================================================
53
- // $ SPACING UNITS (su-)
54
- // ----------------------------------------------------------------------------
55
- @su1: 1px;
56
- @su2: 2px;
57
- @su4: 4px;
58
- @su6: 6px;
59
- @su8: 8px;
60
- @su12: 12px;
61
- @su16: 16px;
62
- @su24: 24px;
63
- @su32: 32px;
64
- @su48: 48px;
65
- @su64: 64px;
66
- @su96: 96px;
67
- @su128: 128px;
68
-
69
-
70
- // ============================================================================
71
- // $ SIZING UNITS (su-)
72
- // ----------------------------------------------------------------------------
73
- @s-full: 97.2307692rem; // Based on a pixel size of 1264px;
74
- @s-step: (@s-full / 12);
75
-
76
- // TODO These helpers allow us to create our own timing functions with
77
- // cubic-bezier ~ but perhaps the default timing functions are acceptable?
78
-
79
- // ============================================================================
80
- // $ TRANSITION EASINGS (te-)
81
- // ----------------------------------------------------------------------------
82
- @te-smooth-slow: cubic-bezier(0.25, 0.46, 0.45, 0.94); // easeOutQuad
83
- @te-smooth: cubic-bezier(0.165, 0.84, 0.44, 1); // easeOutQuart
84
- @te-smooth-quick: cubic-bezier(0.19, 1, 0.22, 1); // easeOutExpo
85
- @te-back-out: cubic-bezier(0.175, 0.885, 0.32, 1.275); // easeOutBack
86
- @te-back-in-out: cubic-bezier(0.68, -0.55, 0.265, 1.55); // easeInOutBack
87
- @te-ease-in: cubic-bezier(0.47, 0, 0.745, 0.715); // easeIn
88
- @te-ease-in-out: cubic-bezier(0.445, 0.05, 0.55, 0.95); // easeInOut
89
- @te-ease-out: cubic-bezier(0.39, 0.575, 0.565, 1); // easeOut
90
-
91
- @default-transition-duration: 0.1s;
92
- @transition-time: @default-transition-duration;
93
-
94
-
95
- // ============================================================================
96
- // $ SCROLLBAR STYLING
97
- // ----------------------------------------------------------------------------
98
- @scrollbar-styles: {
99
- &::-webkit-scrollbar {
100
- width: @su12 - @su2;
101
- height: @su12 - @su2;
102
- background-color: transparent;
103
- }
104
-
105
- &::-webkit-scrollbar-track {
106
- border-radius: @su12 - @su2;
107
- background-color: transparent;
108
- }
109
-
110
- &::-webkit-scrollbar-thumb {
111
- border-radius: @su12 - @su2;
112
- background-color: var(--scrollbar);
113
- }
114
-
115
- &::-webkit-scrollbar-corner {
116
- background-color: transparent;
117
- border-color: transparent;
118
- }
119
-
120
- scrollbar-color: var(--scrollbar) transparent;
121
- }
122
-
123
- // ============================================================================
124
- // $ FOCUS STYLING
125
- // ----------------------------------------------------------------------------
126
- @focus-styles: {
127
- // Hide focus styles if they're not needed, for example,
128
- // when an element receives focus via the mouse.
129
- &:focus:not(:focus-visible) {
130
- outline: none;
131
- box-shadow: none;
132
- }
133
-
134
- // Show focus styles on keyboard focus.
135
- &:focus-visible {
136
- outline: none;
137
- box-shadow: 0 0 0 @su4 var(--focus-ring-muted);
138
- }
139
- }
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
+ // • spacing units (su-)
17
+ // • transition easings (te-)
18
+ //
19
+ // ============================================================================
20
+ // $ Z-INDEX (zi-)
21
+ // Used for a bird's eye view of components dependent on the z-axis.
22
+ // Try to avoid customizing these.
23
+ // ----------------------------------------------------------------------------
24
+ @zi-hide: -1; // Hide something all the elements
25
+ @zi-base: 0; // Reset to 0
26
+ @zi-selected: 25; // Pop above siblings
27
+ @zi-active: 30; // Pop above selected siblings
28
+ @zi-dropdown: 1000; // Dropdowns
29
+ @zi-popovers: 2000; // Popovers, Popups, Autocompletes
30
+ @zi-tooltips: 3000; // Tooltips
31
+ @zi-banners: 4000; // Banners
32
+ @zi-navigation: 5000; // Navigation Bars
33
+ @zi-navigation-fixed: 5050; // Fixed navigation bars
34
+ @zi-modals: 9000; // Modals
35
+ @zi-modals-background: @zi-modals - 50;
36
+
37
+ // ============================================================================
38
+ // $ RESPONSIVE BREAKPOINTS
39
+ // ----------------------------------------------------------------------------
40
+ @breakpoint-lg: 1264px;
41
+ @breakpoint-md: 980px;
42
+ @breakpoint-sm: 640px;
43
+
44
+ // ============================================================================
45
+ // $ BORDER RADIUS (br-)
46
+ // ----------------------------------------------------------------------------
47
+ @br-sm: 3px;
48
+ @br-md: 5px;
49
+ @br-lg: 7px;
50
+ @br-circle: 50%;
51
+
52
+ // ============================================================================
53
+ // $ SPACING UNITS (su-)
54
+ // ----------------------------------------------------------------------------
55
+ @su1: 1px;
56
+ @su2: 2px;
57
+ @su4: 4px;
58
+ @su6: 6px;
59
+ @su8: 8px;
60
+ @su12: 12px;
61
+ @su16: 16px;
62
+ @su24: 24px;
63
+ @su32: 32px;
64
+ @su48: 48px;
65
+ @su64: 64px;
66
+ @su96: 96px;
67
+ @su128: 128px;
68
+
69
+
70
+ // ============================================================================
71
+ // $ SIZING UNITS (su-)
72
+ // ----------------------------------------------------------------------------
73
+ @s-full: 97.2307692rem; // Based on a pixel size of 1264px;
74
+ @s-step: (@s-full / 12);
75
+
76
+ // TODO These helpers allow us to create our own timing functions with
77
+ // cubic-bezier ~ but perhaps the default timing functions are acceptable?
78
+
79
+ // ============================================================================
80
+ // $ TRANSITION EASINGS (te-)
81
+ // ----------------------------------------------------------------------------
82
+ @te-smooth-slow: cubic-bezier(0.25, 0.46, 0.45, 0.94); // easeOutQuad
83
+ @te-smooth: cubic-bezier(0.165, 0.84, 0.44, 1); // easeOutQuart
84
+ @te-smooth-quick: cubic-bezier(0.19, 1, 0.22, 1); // easeOutExpo
85
+ @te-back-out: cubic-bezier(0.175, 0.885, 0.32, 1.275); // easeOutBack
86
+ @te-back-in-out: cubic-bezier(0.68, -0.55, 0.265, 1.55); // easeInOutBack
87
+ @te-ease-in: cubic-bezier(0.47, 0, 0.745, 0.715); // easeIn
88
+ @te-ease-in-out: cubic-bezier(0.445, 0.05, 0.55, 0.95); // easeInOut
89
+ @te-ease-out: cubic-bezier(0.39, 0.575, 0.565, 1); // easeOut
90
+
91
+ @default-transition-duration: 0.1s;
92
+ @transition-time: @default-transition-duration;
93
+
94
+
95
+ // ============================================================================
96
+ // $ SCROLLBAR STYLING
97
+ // ----------------------------------------------------------------------------
98
+ @scrollbar-styles: {
99
+ &::-webkit-scrollbar {
100
+ width: @su12 - @su2;
101
+ height: @su12 - @su2;
102
+ background-color: transparent;
103
+ }
104
+
105
+ &::-webkit-scrollbar-track {
106
+ border-radius: @su12 - @su2;
107
+ background-color: transparent;
108
+ }
109
+
110
+ &::-webkit-scrollbar-thumb {
111
+ border-radius: @su12 - @su2;
112
+ background-color: var(--scrollbar);
113
+ }
114
+
115
+ &::-webkit-scrollbar-corner {
116
+ background-color: transparent;
117
+ border-color: transparent;
118
+ }
119
+
120
+ scrollbar-color: var(--scrollbar) transparent;
121
+ }
122
+
123
+ // ============================================================================
124
+ // $ FOCUS STYLING
125
+ // ----------------------------------------------------------------------------
126
+ @focus-styles: {
127
+ // Hide focus styles if they're not needed, for example,
128
+ // when an element receives focus via the mouse.
129
+ &:focus:not(:focus-visible) {
130
+ outline: none;
131
+ box-shadow: none;
132
+ }
133
+
134
+ // Show focus styles on keyboard focus.
135
+ &:focus-visible {
136
+ outline: none;
137
+ box-shadow: 0 0 0 @su4 var(--focus-ring-muted);
138
+ }
139
+ }
@@ -1,91 +1,152 @@
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
- @ff-sans:
17
- -apple-system, BlinkMacSystemFont, // San Francisco on macOS and iOS
18
- "Segoe UI", // Windows
19
- "Liberation Sans", // Linux
20
- sans-serif; // The final fallback for rendering in sans-serif.
21
- @ff-serif: Georgia, Cambria, "Times New Roman", Times, serif;
22
- @ff-mono:
23
- ui-monospace, // San Francisco Mono on macOS and iOS
24
- "Cascadia Mono", "Segoe UI Mono", // Newer Windows monospace fonts that are optionally installed. Most likely to be rendered in Consolas
25
- "Liberation Mono", // Linux
26
- Menlo, Monaco, Consolas, // A few sensible system font choices
27
- monospace; // The final fallback for rendering in monospace.
28
-
29
- body {
30
- --ff-sans: @ff-sans;
31
- --ff-serif: @ff-serif;
32
- --ff-mono: @ff-mono;
33
- --theme-body-font-family: var(--ff-sans);
34
- }
35
-
36
- // ============================================================================
37
- // $ FONT SIZES (fs-)
38
- // Base font-size is 13px.
39
- // ----------------------------------------------------------------------------
40
- @fs-fine: 11px;
41
- @fs-caption: 12px;
42
- @fs-body1: 13px;
43
-
44
- // Relative to the root element
45
- @fs-body2: 1.153846154rem;
46
- @fs-body3: 1.307692308rem;
47
- @fs-subheading: 1.461538462rem;
48
- @fs-title: 1.615384615rem;
49
- @fs-headline1: 2.076923077rem;
50
- @fs-headline2: 2.615384615rem;
51
- @fs-display1: 3.307692308rem;
52
- @fs-display2: 4.230769231rem;
53
- @fs-display3: 5.307692308rem;
54
- @fs-display4: 7.615384615rem;
55
-
56
- // Relative to the parent
57
- @fs-body2-relative: 1.153846154em;
58
- @fs-body3-relative: 1.307692308em;
59
- @fs-subheading-relative: 1.461538462em;
60
- @fs-title-relative: 1.615384615em;
61
- @fs-headline1-relative: 2.076923077em;
62
- @fs-headline2-relative: 2.615384615em;
63
- @fs-display1-relative: 3.307692308em;
64
- @fs-display2-relative: 4.230769231em;
65
- @fs-display3-relative: 5.307692308em;
66
- @fs-display4-relative: 7.615384615em;
67
-
68
- @fs-base: 13px;
69
-
70
-
71
- // ============================================================================
72
- // $ LINE HEIGHT (lh-)
73
- // ----------------------------------------------------------------------------
74
- // Need to remove the unit off the font-size to make line-height unitless
75
- // FIXME this shouldn't be public.
76
- @_stacks-internals-lh-unit: unit(@fs-base);
77
-
78
- // Now the various line-height variables
79
- @lh-xs: 1;
80
- @lh-sm: ((@_stacks-internals-lh-unit + 2) / @_stacks-internals-lh-unit);
81
- @lh-md: ((@_stacks-internals-lh-unit + 4) / @_stacks-internals-lh-unit);
82
- @lh-lg: ((@_stacks-internals-lh-unit + 8) / @_stacks-internals-lh-unit);
83
- @lh-xl: ((@_stacks-internals-lh-unit + 12) / @_stacks-internals-lh-unit);
84
- @lh-xxl: 2;
85
-
86
- @lh-base: @lh-md;
87
-
88
- // Holdover line-heights from production. These are NOT to be used and
89
- // need to be deprecated.
90
- // ----------------------------------------------------------------------------
91
- @lh-6: ((@_stacks-internals-lh-unit + 6) / @_stacks-internals-lh-unit);
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
+ @ff-sans:
78
+ -apple-system, BlinkMacSystemFont, // San Francisco on macOS and iOS
79
+ "Segoe UI Adjusted", "Segoe UI", // Windows
80
+ "Liberation Sans", // Linux
81
+ sans-serif; // The final fallback for rendering in sans-serif.
82
+ @ff-serif: Georgia, Cambria, "Times New Roman", Times, serif;
83
+ @ff-mono:
84
+ ui-monospace, // San Francisco Mono on macOS and iOS
85
+ "Cascadia Mono", "Segoe UI Mono", // Newer Windows monospace fonts that are optionally installed. Most likely to be rendered in Consolas
86
+ "Liberation Mono", // Linux
87
+ Menlo, Monaco, Consolas, // A few sensible system font choices
88
+ monospace; // The final fallback for rendering in monospace.
89
+
90
+ body {
91
+ --ff-sans: @ff-sans;
92
+ --ff-serif: @ff-serif;
93
+ --ff-mono: @ff-mono;
94
+ --theme-body-font-family: var(--ff-sans);
95
+ }
96
+
97
+ // ============================================================================
98
+ // $ FONT SIZES (fs-)
99
+ // Base font-size is 13px.
100
+ // ----------------------------------------------------------------------------
101
+ @fs-fine: 11px;
102
+ @fs-caption: 12px;
103
+ @fs-body1: 13px;
104
+
105
+ // Relative to the root element
106
+ @fs-body2: 1.153846154rem;
107
+ @fs-body3: 1.307692308rem;
108
+ @fs-subheading: 1.461538462rem;
109
+ @fs-title: 1.615384615rem;
110
+ @fs-headline1: 2.076923077rem;
111
+ @fs-headline2: 2.615384615rem;
112
+ @fs-display1: 3.307692308rem;
113
+ @fs-display2: 4.230769231rem;
114
+ @fs-display3: 5.307692308rem;
115
+ @fs-display4: 7.615384615rem;
116
+
117
+ // Relative to the parent
118
+ @fs-body2-relative: 1.153846154em;
119
+ @fs-body3-relative: 1.307692308em;
120
+ @fs-subheading-relative: 1.461538462em;
121
+ @fs-title-relative: 1.615384615em;
122
+ @fs-headline1-relative: 2.076923077em;
123
+ @fs-headline2-relative: 2.615384615em;
124
+ @fs-display1-relative: 3.307692308em;
125
+ @fs-display2-relative: 4.230769231em;
126
+ @fs-display3-relative: 5.307692308em;
127
+ @fs-display4-relative: 7.615384615em;
128
+
129
+ @fs-base: 13px;
130
+
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.
137
+ @_stacks-internals-lh-unit: unit(@fs-base);
138
+
139
+ // Now the various line-height variables
140
+ @lh-xs: 1;
141
+ @lh-sm: ((@_stacks-internals-lh-unit + 2) / @_stacks-internals-lh-unit);
142
+ @lh-md: ((@_stacks-internals-lh-unit + 4) / @_stacks-internals-lh-unit);
143
+ @lh-lg: ((@_stacks-internals-lh-unit + 8) / @_stacks-internals-lh-unit);
144
+ @lh-xl: ((@_stacks-internals-lh-unit + 12) / @_stacks-internals-lh-unit);
145
+ @lh-xxl: 2;
146
+
147
+ @lh-base: @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: ((@_stacks-internals-lh-unit + 6) / @_stacks-internals-lh-unit);
@@ -1,15 +1,15 @@
1
- //
2
- // STACK OVERFLOW
3
- // VARIABLES
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
- // Wherein we establish a bunch of values to make our lives a lot easier.
10
- //
11
- // ============================================================================
12
- @import "_stacks-constants-type.less"; // Type styles, sizes, and line-heights
13
- @import "_stacks-constants-helpers.less"; // Border radius, z-index, spacing, transitions, etc
14
- @import "_stacks-constants-colors.less"; // Colors
15
- @import "_stacks-mixins.less";
1
+ //
2
+ // STACK OVERFLOW
3
+ // VARIABLES
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
+ // Wherein we establish a bunch of values to make our lives a lot easier.
10
+ //
11
+ // ============================================================================
12
+ @import "_stacks-constants-type.less"; // Type styles, sizes, and line-heights
13
+ @import "_stacks-constants-helpers.less"; // Border radius, z-index, spacing, transitions, etc
14
+ @import "_stacks-constants-colors.less"; // Colors
15
+ @import "_stacks-mixins.less";