@stackoverflow/stacks 0.74.0 → 1.0.0-beta.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 (89) hide show
  1. package/dist/controllers/index.d.ts +7 -0
  2. package/dist/controllers/s-expandable-control.d.ts +17 -0
  3. package/dist/controllers/s-modal.d.ts +97 -0
  4. package/dist/controllers/s-navigation-tablist.d.ts +36 -0
  5. package/dist/controllers/s-popover.d.ts +155 -0
  6. package/dist/controllers/s-table.d.ts +8 -0
  7. package/dist/controllers/s-tooltip.d.ts +82 -0
  8. package/dist/controllers/s-uploader.d.ts +48 -0
  9. package/dist/css/stacks.css +4633 -2703
  10. package/dist/css/stacks.min.css +1 -1
  11. package/dist/index.d.ts +3 -0
  12. package/dist/js/stacks.js +6026 -5403
  13. package/dist/js/stacks.min.js +1 -1
  14. package/dist/stacks.d.ts +21 -0
  15. package/lib/css/atomic/{_stacks-borders.less → borders.less} +30 -30
  16. package/lib/css/atomic/{_stacks-colors.less → colors.less} +0 -0
  17. package/lib/css/atomic/{_stacks-flex.less → flex.less} +14 -13
  18. package/lib/css/atomic/{_stacks-grid.less → grid.less} +12 -11
  19. package/lib/css/atomic/{_stacks-misc.less → misc.less} +23 -22
  20. package/lib/css/atomic/spacing.less +314 -0
  21. package/lib/css/atomic/{_stacks-typography.less → typography.less} +29 -29
  22. package/lib/css/atomic/width-height.less +194 -0
  23. package/lib/css/base/{_stacks-body.less → body.less} +3 -5
  24. package/lib/css/base/{_stacks-configuration-static.less → configuration-static.less} +3 -1
  25. package/lib/css/base/{_stacks-icons.less → icons.less} +0 -0
  26. package/lib/css/base/{_stacks-internals.less → internals.less} +0 -10
  27. package/lib/css/base/{_stacks-reset-meyer.less → reset-meyer.less} +0 -0
  28. package/lib/css/base/{_stacks-reset-normalize.less → reset-normalize.less} +0 -0
  29. package/lib/css/base/{_stacks-reset.less → reset.less} +2 -2
  30. package/lib/css/components/{_stacks-activity-indicator.less → activity-indicator.less} +9 -9
  31. package/lib/css/components/{_stacks-avatars.less → avatars.less} +40 -40
  32. package/lib/css/components/{_stacks-badges.less → badges.less} +11 -11
  33. package/lib/css/components/{_stacks-banners.less → banners.less} +5 -6
  34. package/lib/css/components/{_stacks-blank-states.less → blank-states.less} +2 -2
  35. package/lib/css/components/{_stacks-breadcrumbs.less → breadcrumbs.less} +7 -7
  36. package/lib/css/components/{_stacks-button-groups.less → button-groups.less} +2 -2
  37. package/lib/css/components/{_stacks-buttons.less → buttons.less} +77 -72
  38. package/lib/css/components/{_stacks-cards.less → cards.less} +2 -2
  39. package/lib/css/components/{_stacks-code-blocks.less → code-blocks.less} +8 -8
  40. package/lib/css/components/{_stacks-collapsible.less → collapsible.less} +0 -0
  41. package/lib/css/components/{_stacks-inputs.less → inputs.less} +41 -41
  42. package/lib/css/components/{_stacks-link-previews.less → link-previews.less} +17 -17
  43. package/lib/css/components/{_stacks-links.less → links.less} +4 -4
  44. package/lib/css/components/{_stacks-menu.less → menu.less} +5 -5
  45. package/lib/css/components/{_stacks-modals.less → modals.less} +20 -20
  46. package/lib/css/components/{_stacks-navigation.less → navigation.less} +12 -12
  47. package/lib/css/components/{_stacks-notices.less → notices.less} +12 -12
  48. package/lib/css/components/{_stacks-page-titles.less → page-titles.less} +9 -9
  49. package/lib/css/components/{_stacks-pagination.less → pagination.less} +8 -8
  50. package/lib/css/components/{_stacks-popovers.less → popovers.less} +17 -17
  51. package/lib/css/components/{_stacks-post-summary.less → post-summary.less} +155 -60
  52. package/lib/css/components/{_stacks-progress-bars.less → progress-bars.less} +29 -30
  53. package/lib/css/components/{_stacks-prose.less → prose.less} +31 -31
  54. package/lib/css/components/{_stacks-spinner.less → spinner.less} +14 -14
  55. package/lib/css/components/{_stacks-tables.less → tables.less} +10 -10
  56. package/lib/css/components/{_stacks-tags.less → tags.less} +33 -41
  57. package/lib/css/components/{_stacks-toggle-switches.less → toggle-switches.less} +5 -5
  58. package/lib/css/components/{_stacks-topbar.less → topbar.less} +27 -40
  59. package/lib/css/components/{_stacks-uploader.less → uploader.less} +18 -18
  60. package/lib/css/components/{_stacks-user-cards.less → user-cards.less} +14 -14
  61. package/lib/css/components/{_stacks-widget-dynamic.less → widget-dynamic.less} +1 -1
  62. package/lib/css/components/{_stacks-widget-static.less → widget-static.less} +39 -38
  63. package/lib/css/exports/{_stacks-constants-colors.less → constants-colors.less} +21 -29
  64. package/lib/css/exports/constants-helpers.less +108 -0
  65. package/lib/css/exports/constants-type.less +153 -0
  66. package/lib/css/exports/{_stacks-exports.less → exports.less} +4 -4
  67. package/lib/css/exports/{_stacks-mixins.less → mixins.less} +18 -1
  68. package/lib/css/stacks-dynamic.less +12 -13
  69. package/lib/css/stacks-static.less +38 -38
  70. package/lib/ts/controllers/index.ts +8 -0
  71. package/lib/ts/controllers/s-expandable-control.ts +163 -164
  72. package/lib/ts/controllers/s-modal.ts +259 -261
  73. package/lib/ts/controllers/s-navigation-tablist.ts +96 -97
  74. package/lib/ts/controllers/s-popover.ts +438 -440
  75. package/lib/ts/controllers/s-table.ts +203 -203
  76. package/lib/ts/controllers/s-tooltip.ts +195 -196
  77. package/lib/ts/controllers/s-uploader.ts +162 -164
  78. package/lib/ts/index.ts +20 -0
  79. package/lib/ts/stacks.ts +73 -68
  80. package/lib/tsconfig.json +8 -6
  81. package/package.json +43 -27
  82. package/dist/css/stacks-flexgrid-shim.min.css +0 -1
  83. package/lib/css/atomic/_stacks-spacing.less +0 -162
  84. package/lib/css/atomic/_stacks-width-height.less +0 -189
  85. package/lib/css/base/_stacks-configuration-dynamic.less +0 -106
  86. package/lib/css/exports/_stacks-constants-helpers.less +0 -139
  87. package/lib/css/exports/_stacks-constants-type.less +0 -91
  88. package/lib/ts/finalize.ts +0 -1
  89. package/lib/ts/stimulus.d.ts +0 -4
@@ -26,21 +26,21 @@ p {
26
26
  // $ TEXT SIZES
27
27
  // ----------------------------------------------------------------------------
28
28
  // Declare font sizes
29
- .fs-display4 { font-size: @fs-display4 !important; }
30
- .fs-display3 { font-size: @fs-display3 !important; }
31
- .fs-display2 { font-size: @fs-display2 !important; }
32
- .fs-display1 { font-size: @fs-display1 !important; }
33
- .fs-headline2 { font-size: @fs-headline2 !important; }
34
- .fs-headline1 { font-size: @fs-headline1 !important; }
35
- .fs-title { font-size: @fs-title !important; }
36
- .fs-subheading { font-size: @fs-subheading !important; }
37
- .fs-body3 { font-size: @fs-body3 !important; }
38
- .fs-body2 { font-size: @fs-body2 !important; }
39
- .fs-body1 { font-size: @fs-body1 !important; }
29
+ .fs-display4 { font-size: var(--fs-display4) !important; }
30
+ .fs-display3 { font-size: var(--fs-display3) !important; }
31
+ .fs-display2 { font-size: var(--fs-display2) !important; }
32
+ .fs-display1 { font-size: var(--fs-display1) !important; }
33
+ .fs-headline2 { font-size: var(--fs-headline2) !important; }
34
+ .fs-headline1 { font-size: var(--fs-headline1) !important; }
35
+ .fs-title { font-size: var(--fs-title) !important; }
36
+ .fs-subheading { font-size: var(--fs-subheading) !important; }
37
+ .fs-body3 { font-size: var(--fs-body3) !important; }
38
+ .fs-body2 { font-size: var(--fs-body2) !important; }
39
+ .fs-body1 { font-size: var(--fs-body1) !important; }
40
40
 
41
41
  .fs-caption,
42
- .fs-category { font-size: @fs-caption !important; }
43
- .fs-fine { font-size: @fs-fine !important; }
42
+ .fs-category { font-size: var(--fs-caption) !important; }
43
+ .fs-fine { font-size: var(--fs-fine) !important; }
44
44
 
45
45
  #stacks-internals #screen-sm({
46
46
  .fs-display4 { font-size: 3.8rem !important; }
@@ -62,7 +62,7 @@ p {
62
62
  // If a top border is desired
63
63
  &.has-border {
64
64
  width: 100%;
65
- padding: @su4 0;
65
+ padding: var(--su4) 0;
66
66
  border-top: 1px solid var(--bc-medium);
67
67
  }
68
68
  }
@@ -77,12 +77,12 @@ p {
77
77
  // ============================================================================
78
78
  // $ LINE HEIGHTS
79
79
  // ----------------------------------------------------------------------------
80
- .lh-xs { line-height: @lh-xs !important; }
81
- .lh-sm { line-height: @lh-sm !important; }
82
- .lh-md { line-height: @lh-md !important; }
83
- .lh-lg { line-height: @lh-lg !important; }
84
- .lh-xl { line-height: @lh-xl !important; }
85
- .lh-xxl { line-height: @lh-xxl !important; }
80
+ .lh-xs { line-height: var(--lh-xs) !important; }
81
+ .lh-sm { line-height: var(--lh-sm) !important; }
82
+ .lh-md { line-height: var(--lh-md) !important; }
83
+ .lh-lg { line-height: var(--lh-lg) !important; }
84
+ .lh-xl { line-height: var(--lh-xl) !important; }
85
+ .lh-xxl { line-height: var(--lh-xxl) !important; }
86
86
  .lh-unset { line-height: initial !important; }
87
87
 
88
88
  // ============================================================================
@@ -160,20 +160,20 @@ p {
160
160
 
161
161
  .v-truncate-fade {
162
162
  overflow: hidden;
163
- -webkit-mask-image: linear-gradient(180deg, #000 @lh-md * 9em, transparent);
164
- mask-image: linear-gradient(180deg, #000 @lh-md * 9em, transparent);
165
- max-height: @lh-md * 12em;
163
+ -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--lh-md) * 9em), transparent);
164
+ mask-image: linear-gradient(180deg, #000 calc(var(--lh-md) * 9em), transparent);
165
+ max-height: calc(var(--lh-md) * 12em);
166
166
 
167
167
  &.v-truncate-fade__sm {
168
- -webkit-mask-image: linear-gradient(180deg, #000 @lh-md * 3em, transparent);
169
- mask-image: linear-gradient(180deg, #000 @lh-md * 3em, transparent);
170
- max-height: @lh-md * 6em;
168
+ -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--lh-md) * 3em), transparent);
169
+ mask-image: linear-gradient(180deg, #000 calc(var(--lh-md) * 3em), transparent);
170
+ max-height: calc(var(--lh-md) * 6em);
171
171
  }
172
172
 
173
173
  &.v-truncate-fade__lg {
174
- -webkit-mask-image: linear-gradient(180deg, #000 @lh-md * 21em, transparent);
175
- mask-image: linear-gradient(180deg, #000 @lh-md * 21em, transparent);
176
- max-height: @lh-md * 24em;
174
+ -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--lh-md) * 21em), transparent);
175
+ mask-image: linear-gradient(180deg, #000 calc(var(--lh-md) * 21em), transparent);
176
+ max-height: calc(var(--lh-md) * 24em);
177
177
  }
178
178
  }
179
179
 
@@ -0,0 +1,194 @@
1
+ //
2
+ // STACK OVERFLOW
3
+ // WIDTH & HEIGHT
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
+ // • WIDTH
10
+ // • PERCENTAGE
11
+ // • STATIC
12
+ // • MAX-WIDTH
13
+ // • MIN-WIDTH
14
+ // • HEIGHT
15
+ // • PERCENTAGE
16
+ // • STATIC
17
+ // • MAX-HEIGHT
18
+ // • MIN-HEIGHT
19
+ //
20
+ // ============================================================================
21
+ // $ WIDTH
22
+ // ----------------------------------------------------------------------------
23
+ // $$ PERCENTAGE AND VIEWPORT UNITS
24
+ .w0 { width: 0 !important; }
25
+ .w10 { width: 10% !important; }
26
+ .w20 { width: 20% !important; }
27
+ #stacks-internals #responsify('.w25', { width: 25% !important; });
28
+ .w30 { width: 30% !important; }
29
+ #stacks-internals #responsify('.w33', { width: 33.33333% !important; });
30
+ .w40 { width: 40% !important; }
31
+ #stacks-internals #responsify('.w50', { width: 50% !important; });
32
+ .w60 { width: 60% !important; }
33
+ #stacks-internals #responsify('.w66', { width: 66.66667% !important; });
34
+ .w70 { width: 70% !important; }
35
+ #stacks-internals #responsify('.w75', { width: 75% !important; });
36
+ .w80 { width: 80% !important; }
37
+ .w90 { width: 90% !important; }
38
+ #stacks-internals #responsify('.w100', { width: 100% !important; });
39
+ #stacks-internals #responsify('.w-auto', { width: auto !important; });
40
+ #stacks-internals #responsify('.w-screen', { width: 100vw !important; });
41
+
42
+ // $$ STATIC
43
+ .ws0,
44
+ .w0 { width: 0 !important; }
45
+ .ws1 { width: var(--s-step) !important; }
46
+ .ws2 { width: calc(var(--s-step) * 2) !important; }
47
+ .ws3 { width: calc(var(--s-step) * 3) !important; }
48
+ .ws4 { width: calc(var(--s-step) * 4) !important; }
49
+ .ws5 { width: calc(var(--s-step) * 5) !important; }
50
+ .ws6 { width: calc(var(--s-step) * 6) !important; }
51
+ .ws7 { width: calc(var(--s-step) * 7) !important; }
52
+ .ws8 { width: calc(var(--s-step) * 8) !important; }
53
+ .ws9 { width: calc(var(--s-step) * 9) !important; }
54
+ .ws10 { width: calc(var(--s-step) * 10) !important; }
55
+ .ws11 { width: calc(var(--s-step) * 11) !important; }
56
+ .ws12 { width: var(--s-full) !important; }
57
+
58
+ // $$ SPACING UNITS
59
+ .w2 { width: var(--su-static2) !important; }
60
+ .w4 { width: var(--su-static4) !important; }
61
+ .w6 { width: var(--su-static6) !important; }
62
+ .w8 { width: var(--su-static8) !important; }
63
+ .w12 { width: var(--su-static12) !important; }
64
+ .w16 { width: var(--su-static16) !important; }
65
+ .w24 { width: var(--su-static24) !important; }
66
+ .w32 { width: var(--su-static32) !important; }
67
+ .w48 { width: var(--su-static48) !important; }
68
+ .w64 { width: var(--su-static64) !important; }
69
+ .w96 { width: var(--su-static96) !important; }
70
+ .w128 { width: var(--su-static128) !important; }
71
+
72
+ // ============================================================================
73
+ // $ MAX-WIDTH
74
+ // ----------------------------------------------------------------------------
75
+ .wmx0 { max-width: 0 !important; }
76
+ .wmx1 { max-width: var(--s-step) !important; }
77
+ .wmx2 { max-width: calc(var(--s-step) * 2) !important; }
78
+ .wmx25 { max-width: 25% !important; }
79
+ .wmx3 { max-width: calc(var(--s-step) * 3) !important; }
80
+ .wmx4 { max-width: calc(var(--s-step) * 4) !important; }
81
+ .wmx5 { max-width: calc(var(--s-step) * 5) !important; }
82
+ .wmx50 { max-width: 50% !important; }
83
+ .wmx6 { max-width: calc(var(--s-step) * 6) !important; }
84
+ .wmx7 { max-width: calc(var(--s-step) * 7) !important; }
85
+ .wmx75 { max-width: 75% !important; }
86
+ .wmx8 { max-width: calc(var(--s-step) * 8) !important; }
87
+ .wmx9 { max-width: calc(var(--s-step) * 9) !important; }
88
+ .wmx10 { max-width: calc(var(--s-step) * 10) !important; }
89
+ .wmx11 { max-width: calc(var(--s-step) * 11) !important; }
90
+ .wmx12 { max-width: var(--s-full) !important; }
91
+ #stacks-internals #responsify('.wmx100', { max-width: 100% !important; });
92
+ #stacks-internals #responsify('.wmx-initial', { max-width: initial !important; });
93
+ #stacks-internals #responsify('.wmx-screen', { max-width: 100vw !important; });
94
+
95
+ // ============================================================================
96
+ // $ MIN-WIDTH
97
+ // ----------------------------------------------------------------------------
98
+ .wmn0 { min-width: 0 !important; }
99
+ .wmn1 { min-width: var(--s-step) !important; }
100
+ .wmn2 { min-width: calc(var(--s-step) * 2) !important; }
101
+ .wmn25 { min-width: 25% !important; }
102
+ .wmn3 { min-width: calc(var(--s-step) * 3) !important; }
103
+ .wmn4 { min-width: calc(var(--s-step) * 4) !important; }
104
+ .wmn5 { min-width: calc(var(--s-step) * 5) !important; }
105
+ .wmn50 { min-width: 50% !important; }
106
+ .wmn6 { min-width: calc(var(--s-step) * 6) !important; }
107
+ .wmn7 { min-width: calc(var(--s-step) * 7) !important; }
108
+ .wmn75 { min-width: 75% !important; }
109
+ .wmn8 { min-width: calc(var(--s-step) * 8) !important; }
110
+ .wmn9 { min-width: calc(var(--s-step) * 9) !important; }
111
+ .wmn10 { min-width: calc(var(--s-step) * 10) !important; }
112
+ .wmn11 { min-width: calc(var(--s-step) * 11) !important; }
113
+ .wmn12 { min-width: var(--s-full) !important; }
114
+ #stacks-internals #responsify('.wmn100', { min-width: 100% !important; });
115
+ #stacks-internals #responsify('.wmn-initial', { min-width: initial !important; });
116
+
117
+ // ============================================================================
118
+ // $ HEIGHT
119
+ // ----------------------------------------------------------------------------
120
+ // $$ PERCENTAGE AND VIEWPORT UNITS
121
+ .h0 { height: 0 !important; }
122
+ #stacks-internals #responsify('.h100', { height: 100% !important; });
123
+ #stacks-internals #responsify('.h-auto', { height: auto !important; });
124
+ #stacks-internals #responsify('.h-screen', { height: 100vh !important; });
125
+
126
+ // $$ STATIC
127
+ .hs0,
128
+ .h0 { height: 0 !important; }
129
+ .hs1 { height: var(--s-step) !important; }
130
+ .hs2 { height: calc(var(--s-step) * 2) !important; }
131
+ .hs3 { height: calc(var(--s-step) * 3) !important; }
132
+ .hs4 { height: calc(var(--s-step) * 4) !important; }
133
+ .hs5 { height: calc(var(--s-step) * 5) !important; }
134
+ .hs6 { height: calc(var(--s-step) * 6) !important; }
135
+ .hs7 { height: calc(var(--s-step) * 7) !important; }
136
+ .hs8 { height: calc(var(--s-step) * 8) !important; }
137
+ .hs9 { height: calc(var(--s-step) * 9) !important; }
138
+ .hs10 { height: calc(var(--s-step) * 10) !important; }
139
+ .hs11 { height: calc(var(--s-step) * 11) !important; }
140
+ .hs12 { height: var(--s-full) !important; }
141
+
142
+ // $$ SPACING UNITS
143
+ .h2 { height: var(--su-static2) !important; }
144
+ .h4 { height: var(--su-static4) !important; }
145
+ .h6 { height: var(--su-static6) !important; }
146
+ .h8 { height: var(--su-static8) !important; }
147
+ .h12 { height: var(--su-static12) !important; }
148
+ .h16 { height: var(--su-static16) !important; }
149
+ .h24 { height: var(--su-static24) !important; }
150
+ .h32 { height: var(--su-static32) !important; }
151
+ .h48 { height: var(--su-static48) !important; }
152
+ .h64 { height: var(--su-static64) !important; }
153
+ .h96 { height: var(--su-static96) !important; }
154
+ .h128 { height: var(--su-static128) !important; }
155
+
156
+ // ============================================================================
157
+ // $ MAX-HEIGHT
158
+ // ----------------------------------------------------------------------------
159
+ .hmx0 { max-height: 0 !important; }
160
+ .hmx1 { max-height: var(--s-step) !important; }
161
+ .hmx2 { max-height: calc(var(--s-step) * 2) !important; }
162
+ .hmx3 { max-height: calc(var(--s-step) * 3) !important; }
163
+ .hmx4 { max-height: calc(var(--s-step) * 4) !important; }
164
+ .hmx5 { max-height: calc(var(--s-step) * 5) !important; }
165
+ .hmx6 { max-height: calc(var(--s-step) * 6) !important; }
166
+ .hmx7 { max-height: calc(var(--s-step) * 7) !important; }
167
+ .hmx8 { max-height: calc(var(--s-step) * 8) !important; }
168
+ .hmx9 { max-height: calc(var(--s-step) * 9) !important; }
169
+ .hmx10 { max-height: calc(var(--s-step) * 10) !important; }
170
+ .hmx11 { max-height: calc(var(--s-step) * 11) !important; }
171
+ .hmx12 { max-height: var(--s-full) !important; }
172
+ #stacks-internals #responsify('.hmx100', { max-height: 100% !important; });
173
+ #stacks-internals #responsify('.hmx-initial', { max-height: initial !important; });
174
+ #stacks-internals #responsify('.hmx-screen', { max-height: 100vh !important; });
175
+
176
+ // ============================================================================
177
+ // $ MIN-HEIGHT
178
+ // ----------------------------------------------------------------------------
179
+ .hmn0 { min-height: 0 !important; }
180
+ .hmn1 { min-height: var(--s-step) !important; }
181
+ .hmn2 { min-height: calc(var(--s-step) * 2) !important; }
182
+ .hmn3 { min-height: calc(var(--s-step) * 3) !important; }
183
+ .hmn4 { min-height: calc(var(--s-step) * 4) !important; }
184
+ .hmn5 { min-height: calc(var(--s-step) * 5) !important; }
185
+ .hmn6 { min-height: calc(var(--s-step) * 6) !important; }
186
+ .hmn7 { min-height: calc(var(--s-step) * 7) !important; }
187
+ .hmn8 { min-height: calc(var(--s-step) * 8) !important; }
188
+ .hmn9 { min-height: calc(var(--s-step) * 9) !important; }
189
+ .hmn10 { min-height: calc(var(--s-step) * 10) !important; }
190
+ .hmn11 { min-height: calc(var(--s-step) * 11) !important; }
191
+ .hmn12 { min-height: var(--s-full) !important; }
192
+ #stacks-internals #responsify('.hmn100', { min-height: 100% !important; });
193
+ #stacks-internals #responsify('.hmn-initial', { min-height: initial !important; });
194
+ #stacks-internals #responsify('.hmx-screen', { min-height: 100vh !important; });
@@ -18,11 +18,10 @@
18
18
 
19
19
  html,
20
20
  body {
21
- #stacks-internals #load-config();
22
21
  color: var(--theme-body-font-color);
23
22
  font-family: var(--theme-body-font-family);
24
- font-size: @fs-base;
25
- line-height: @lh-base;
23
+ font-size: var(--fs-base);
24
+ line-height: var(--lh-base);
26
25
  }
27
26
 
28
27
  #stacks-internals #screen-sm({
@@ -33,10 +32,9 @@ body {
33
32
  }, @force-selector: true);
34
33
 
35
34
  body {
36
- #stacks-internals #load-config();
37
35
  box-sizing: border-box;
38
36
  min-height: 100%;
39
- background-color: @body-background;
37
+ background-color: var(--theme-background-color);
40
38
 
41
39
  *,
42
40
  *:before,
@@ -1,4 +1,6 @@
1
- // Usage of these options is similar to what's described in _stacks-configuration-dynamic.less, but the options
1
+ // DEPRECATED - DO NOT USE
2
+ //
3
+ // Usage of these options is similar to what's described in configuration-dynamic.less, but the options
2
4
  // in this file also apply to the "static" part of Stacks. In particular this means that these options cannot
3
5
  // be different per-site in the Q&A project, because the static part is a shared CSS file across all Q&A sites.
4
6
 
File without changes
@@ -1,15 +1,5 @@
1
1
  /* stylelint-disable */
2
2
  #stacks-internals() {
3
- // Load the configuration variables into the current scope. Example:
4
- //
5
- // a {
6
- // #stacks-internals #load-config();
7
- // color: @link-color-regular;
8
- // }
9
- #load-config() {
10
- #stacks-config();
11
- }
12
-
13
3
  #load-static-config() {
14
4
  #stacks-config-static();
15
5
  }
@@ -2,10 +2,10 @@
2
2
 
3
3
  #stacks-internals() {
4
4
  #include-css-reset(meyer) {
5
- @import "_stacks-reset-meyer.less";
5
+ @import "reset-meyer.less";
6
6
  }
7
7
  #include-css-reset(normalize) {
8
- @import "_stacks-reset-normalize.less";
8
+ @import "reset-normalize.less";
9
9
  }
10
10
  /* stylelint-disable block-no-empty */
11
11
  #include-css-reset(none) {
@@ -13,15 +13,15 @@
13
13
 
14
14
  .s-activity-indicator {
15
15
  display: inline-block;
16
- min-width: @su12;
17
- height: @su12;
18
- padding-left: @su4;
19
- padding-right: @su4;
16
+ min-width: var(--su-static12);
17
+ height: var(--su-static12);
18
+ padding-left: var(--su4);
19
+ padding-right: var(--su4);
20
20
  line-height: 1.1; // Custom line-height to satisfy 1x screens
21
21
  background-color: var(--theme-secondary-400);
22
- box-shadow: 0 0 0 @su4 var(--focus-ring);
22
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring);
23
23
  border-radius: 1000px;
24
- font-size: @fs-fine;
24
+ font-size: var(--fs-fine);
25
25
  font-weight: 600;
26
26
  color: @white;
27
27
  text-transform: uppercase;
@@ -31,15 +31,15 @@
31
31
 
32
32
  .s-activity-indicator__success {
33
33
  background-color: var(--green-500);
34
- box-shadow: 0 0 0 @su4 var(--focus-ring-success);
34
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring-success);
35
35
  }
36
36
 
37
37
  .s-activity-indicator__warning {
38
38
  background-color: var(--yellow-600);
39
- box-shadow: 0 0 0 @su4 var(--focus-ring-warning);
39
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring-warning);
40
40
  }
41
41
 
42
42
  .s-activity-indicator__danger {
43
43
  background-color: var(--red-500);
44
- box-shadow: 0 0 0 @su4 var(--focus-ring-error);
44
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring-error);
45
45
  }
@@ -18,9 +18,9 @@
18
18
  .s-avatar {
19
19
  display: inline-block; // Make sure the avatar has structure regardless of the element eg. span vs. div
20
20
  position: relative;
21
- width: @su16;
22
- height: @su16;
23
- border-radius: @br-sm;
21
+ width: var(--su-static16);
22
+ height: var(--su-static16);
23
+ border-radius: var(--br-sm);
24
24
  background-color: @white; // Force a white background color for when we have transparent avatars
25
25
  background-repeat: no-repeat;
26
26
  background-size: 100%;
@@ -57,15 +57,15 @@
57
57
  }
58
58
 
59
59
  .s-avatar--image {
60
- width: @su16;
61
- height: @su16;
62
- border-radius: @br-sm;
60
+ width: var(--su-static16);
61
+ height: var(--su-static16);
62
+ border-radius: var(--br-sm);
63
63
  display: block;
64
64
  }
65
65
 
66
66
  &.s-avatar__24 {
67
- width: @su24;
68
- height: @su24;
67
+ width: var(--su-static24);
68
+ height: var(--su-static24);
69
69
 
70
70
  .s-avatar--letter {
71
71
  font-size: 16px; // Force the font size regardless of the parent
@@ -77,15 +77,15 @@
77
77
  }
78
78
 
79
79
  .s-avatar--image {
80
- width: @su24;
81
- height: @su24;
80
+ width: var(--su-static24);
81
+ height: var(--su-static24);
82
82
  }
83
83
  }
84
84
 
85
85
  &.s-avatar__32 {
86
- width: @su32;
87
- height: @su32;
88
- border-radius: @br-md;
86
+ width: var(--su-static32);
87
+ height: var(--su-static32);
88
+ border-radius: var(--br-md);
89
89
 
90
90
  .s-avatar--letter {
91
91
  font-size: 22px; // Force the font size regardless of the parent
@@ -97,16 +97,16 @@
97
97
  }
98
98
 
99
99
  .s-avatar--image {
100
- width: @su32;
101
- height: @su32;
102
- border-radius: @br-md;
100
+ width: var(--su-static32);
101
+ height: var(--su-static32);
102
+ border-radius: var(--br-md);
103
103
  }
104
104
  }
105
105
 
106
106
  &.s-avatar__48 {
107
- width: @su48;
108
- height: @su48;
109
- border-radius: @br-md;
107
+ width: var(--su-static48);
108
+ height: var(--su-static48);
109
+ border-radius: var(--br-md);
110
110
 
111
111
  .s-avatar--letter {
112
112
  font-size: 34px; // Force the font size regardless of the parent
@@ -118,16 +118,16 @@
118
118
  }
119
119
 
120
120
  .s-avatar--image {
121
- width: @su48;
122
- height: @su48;
123
- border-radius: @br-md;
121
+ width: var(--su-static48);
122
+ height: var(--su-static48);
123
+ border-radius: var(--br-md);
124
124
  }
125
125
  }
126
126
 
127
127
  &.s-avatar__64 {
128
- width: @su64;
129
- height: @su64;
130
- border-radius: @br-lg;
128
+ width: var(--su-static64);
129
+ height: var(--su-static64);
130
+ border-radius: var(--br-lg);
131
131
 
132
132
  .s-avatar--letter {
133
133
  font-size: 44px; // Force the font size regardless of the parent
@@ -139,16 +139,16 @@
139
139
  }
140
140
 
141
141
  .s-avatar--image {
142
- width: @su64;
143
- height: @su64;
144
- border-radius: @br-lg;
142
+ width: var(--su-static64);
143
+ height: var(--su-static64);
144
+ border-radius: var(--br-lg);
145
145
  }
146
146
  }
147
147
 
148
148
  &.s-avatar__96 {
149
- width: @su96;
150
- height: @su96;
151
- border-radius: @br-lg + @br-sm;
149
+ width: var(--su-static96);
150
+ height: var(--su-static96);
151
+ border-radius: calc(var(--br-lg) + var(--br-sm));
152
152
 
153
153
  .s-avatar--letter {
154
154
  font-size: 66px; // Force the font size regardless of the parent
@@ -160,16 +160,16 @@
160
160
  }
161
161
 
162
162
  .s-avatar--image {
163
- width: @su96;
164
- height: @su96;
165
- border-radius: @br-lg + @br-sm;
163
+ width: var(--su-static96);
164
+ height: var(--su-static96);
165
+ border-radius: calc(var(--br-lg) + var(--br-sm));
166
166
  }
167
167
  }
168
168
 
169
169
  &.s-avatar__128 {
170
- width: @su128;
171
- height: @su128;
172
- border-radius: @br-lg + @br-lg;
170
+ width: var(--su-static128);
171
+ height: var(--su-static128);
172
+ border-radius: calc(var(--br-lg) + var(--br-lg));
173
173
 
174
174
  .s-avatar--letter {
175
175
  font-size: 88px; // Force the font size regardless of the parent
@@ -181,9 +181,9 @@
181
181
  }
182
182
 
183
183
  .s-avatar--image {
184
- width: @su128;
185
- height: @su128;
186
- border-radius: @br-lg + @br-lg;
184
+ width: var(--su-static128);
185
+ height: var(--su-static128);
186
+ border-radius: calc(var(--br-lg) + var(--br-lg));
187
187
  }
188
188
  }
189
189
  }
@@ -31,11 +31,11 @@
31
31
  align-items: center;
32
32
  justify-content: center;
33
33
  min-width: 0;
34
- padding: 0 @su6;
34
+ padding: 0 var(--su6);
35
35
  border-width: 1px;
36
36
  border-style: solid;
37
- border-radius: @br-sm;
38
- font-size: @fs-caption;
37
+ border-radius: var(--br-sm);
38
+ font-size: var(--fs-caption);
39
39
  font-weight: normal;
40
40
  line-height: 2;
41
41
  text-decoration: none;
@@ -55,8 +55,8 @@
55
55
  .s-badge--image {
56
56
  display: inline-flex;
57
57
  align-self: center;
58
- margin-right: (@su2 / 2);
59
- margin-left: -(@su4 + 1);
58
+ margin-right: var(--su1);
59
+ margin-left: calc((var(--su4) + var(--su1)) * -1);
60
60
  }
61
61
 
62
62
  // $ BADGE SIZES
@@ -64,17 +64,17 @@
64
64
  .s-badge__sm {
65
65
  min-width: 18px;
66
66
  align-self: flex-start;
67
- padding-right: @su4;
68
- padding-left: @su4;
69
- font-size: @fs-fine;
67
+ padding-right: var(--su4);
68
+ padding-left: var(--su4);
69
+ font-size: var(--fs-fine);
70
70
  line-height: 1.8;
71
71
  }
72
72
 
73
73
  .s-badge__xs {
74
74
  align-self: flex-start;
75
- padding-right: @su2;
76
- padding-left: @su2;
77
- font-size: @fs-fine;
75
+ padding-right: var(--su2);
76
+ padding-left: var(--su2);
77
+ font-size: var(--fs-fine);
78
78
  line-height: 1.5;
79
79
  }
80
80
 
@@ -29,18 +29,18 @@
29
29
  // ----------------------------------------------------------------------------
30
30
  .s-banner {
31
31
  position: fixed;
32
- z-index: @zi-navigation-fixed - 1; // Tuck below topbar
32
+ z-index: calc(var(--zi-navigation-fixed) - 1); // Tuck below topbar
33
33
  top: 0;
34
34
  right: 0;
35
35
  left: 0;
36
36
  width: 100%;
37
- padding: @su12;
37
+ padding: var(--su12);
38
38
  border-top: 1px solid transparent;
39
39
  border-bottom: 1px solid transparent;
40
40
  border-radius: 0;
41
41
  box-shadow: none;
42
42
  color: var(--fc-medium);
43
- font-size: @fs-body1;
43
+ font-size: var(--fs-body1);
44
44
 
45
45
  // If you want to hide and reveal the banner
46
46
  &[aria-hidden="true"] {
@@ -59,7 +59,7 @@
59
59
 
60
60
  // If you want to put the banner above the topbar
61
61
  &.is-pinned {
62
- z-index: @zi-navigation-fixed + 1;
62
+ z-index: calc(var(--zi-navigation-fixed) + 1);
63
63
  -webkit-transform: translate3d(0, 0, 0);
64
64
  transform: translate3d(0, 0, 0);
65
65
  }
@@ -73,9 +73,8 @@
73
73
 
74
74
  // -- When we want to keep hero content capped
75
75
  .s-banner--container {
76
- #stacks-internals #load-config();
77
76
  position: relative;
78
77
  width: 100%;
79
- max-width: @body-site-width;
78
+ max-width: calc(var(--s-step) * 10);
80
79
  margin: 0 auto;
81
80
  }
@@ -16,8 +16,8 @@
16
16
  margin-right: auto;
17
17
 
18
18
  p {
19
- font-size: @fs-body1;
20
- margin-bottom: @su12;
19
+ font-size: var(--fs-body1);
20
+ margin-bottom: var(--su12);
21
21
 
22
22
  strong {
23
23
  color: var(--fc-dark);