@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.
- 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 +4633 -2703
- 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} +23 -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} +155 -60
- 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} +21 -29
- 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 +43 -27
- package/dist/css/stacks-flexgrid-shim.min.css +0 -1
- package/lib/css/atomic/_stacks-spacing.less +0 -162
- package/lib/css/atomic/_stacks-width-height.less +0 -189
- 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
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
min-width: auto;
|
|
14
14
|
box-shadow: var(--bs-sm);
|
|
15
15
|
width: 100%;
|
|
16
|
-
z-index:
|
|
16
|
+
z-index: var(--zi-navigation-fixed);
|
|
17
17
|
background-color: var(--theme-topbar-background-color);
|
|
18
18
|
height: var(--theme-topbar-height);
|
|
19
19
|
display: flex;
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
// Wraps the content so the topbar stretches 100% w/ content at some value below that
|
|
47
47
|
.s-topbar--container {
|
|
48
|
-
width:
|
|
48
|
+
width: var(--s-full); // wmx12; Consumers should use atomic classes to override this
|
|
49
49
|
max-width: 100%;
|
|
50
50
|
height: 100%;
|
|
51
51
|
display: flex;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.s-topbar--logo {
|
|
57
|
-
padding: 0
|
|
57
|
+
padding: 0 var(--su8);
|
|
58
58
|
height: 100%;
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: center;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
.s-topbar--menu-btn {
|
|
73
73
|
display: flex;
|
|
74
74
|
height: 100%;
|
|
75
|
-
padding: 0
|
|
75
|
+
padding: 0 var(--su16);
|
|
76
76
|
flex-shrink: 0;
|
|
77
77
|
align-items: center;
|
|
78
78
|
justify-content: center;
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
&,
|
|
84
84
|
&:before,
|
|
85
85
|
&:after {
|
|
86
|
-
width:
|
|
87
|
-
height:
|
|
86
|
+
width: var(--su-static16);
|
|
87
|
+
height: var(--su-static2);
|
|
88
88
|
background-color: var(--theme-topbar-item-color);
|
|
89
89
|
position: relative;
|
|
90
90
|
}
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
--theme-topbar-search-placeholder: @black-200;
|
|
157
157
|
--theme-topbar-search-border: @black-200;
|
|
158
158
|
--theme-topbar-search-border-focus: @blue-300;
|
|
159
|
-
--theme-topbar-search-shadow-focus: 0 0 0
|
|
159
|
+
--theme-topbar-search-shadow-focus: 0 0 0 var(--su-static4) var(--focus-ring);
|
|
160
160
|
|
|
161
161
|
// Search switcher
|
|
162
162
|
--theme-topbar-select-color: @black-700;
|
|
@@ -207,14 +207,14 @@
|
|
|
207
207
|
--theme-topbar-search-placeholder: lighten(@topbar-actual-background, 60% + @topbar-search-lightness-increase);
|
|
208
208
|
--theme-topbar-search-border: lighten(@topbar-actual-background, 20% + @topbar-search-lightness-increase);
|
|
209
209
|
--theme-topbar-search-border-focus: lighten(@topbar-actual-background, 45% + @topbar-search-lightness-increase);
|
|
210
|
-
--theme-topbar-search-shadow-focus: 0 0 0
|
|
210
|
+
--theme-topbar-search-shadow-focus: 0 0 0 var(--su-static4) fade(@white, 30%);
|
|
211
211
|
|
|
212
212
|
// Search switcher
|
|
213
213
|
--theme-topbar-select-color: lighten(@topbar-actual-background, 60% + @topbar-search-lightness-increase);
|
|
214
214
|
--theme-topbar-select-background: lighten(@topbar-actual-background, 10% + @topbar-search-lightness-increase);
|
|
215
215
|
|
|
216
216
|
// Items
|
|
217
|
-
--theme-topbar-item-color: @black-
|
|
217
|
+
--theme-topbar-item-color: @black-100;
|
|
218
218
|
--theme-topbar-item-color-hover: @white;
|
|
219
219
|
--theme-topbar-item-background-hover: @black-700;
|
|
220
220
|
--theme-topbar-item-color-current: @white;
|
|
@@ -243,8 +243,7 @@
|
|
|
243
243
|
// ===========================================================================
|
|
244
244
|
// $ CONTENT & CTAS
|
|
245
245
|
// ---------------------------------------------------------------------------
|
|
246
|
-
.s-topbar .s-topbar--content
|
|
247
|
-
.s-topbar .s-topbar--ctas {
|
|
246
|
+
.s-topbar .s-topbar--content {
|
|
248
247
|
display: flex;
|
|
249
248
|
height: 100%;
|
|
250
249
|
.list-reset;
|
|
@@ -252,18 +251,16 @@
|
|
|
252
251
|
& > li {
|
|
253
252
|
display: inline-flex;
|
|
254
253
|
}
|
|
255
|
-
}
|
|
256
254
|
|
|
257
|
-
.s-topbar .s-topbar--content {
|
|
258
255
|
overflow-x: auto; // Allow this content to scroll if it gets too long
|
|
259
256
|
@scrollbar-styles(); // Style the scrollbars
|
|
260
257
|
margin-left: auto; // Push this section as far to the right as possible
|
|
261
258
|
|
|
262
|
-
.s-topbar--item {
|
|
259
|
+
.s-topbar--item:not(.s-topbar--item__unset) {
|
|
263
260
|
color: var(--theme-topbar-item-color);
|
|
264
261
|
display: inline-flex;
|
|
265
262
|
align-items: center;
|
|
266
|
-
padding: 0 (
|
|
263
|
+
padding: 0 calc(var(--su12) - var(--su2));
|
|
267
264
|
text-decoration: none;
|
|
268
265
|
white-space: nowrap;
|
|
269
266
|
position: relative;
|
|
@@ -280,6 +277,7 @@
|
|
|
280
277
|
|
|
281
278
|
.s-activity-indicator {
|
|
282
279
|
top: calc(50% - 18px);
|
|
280
|
+
box-shadow: 0 0 0 var(--su-static2) var(--theme-topbar-item-background-hover);
|
|
283
281
|
}
|
|
284
282
|
}
|
|
285
283
|
|
|
@@ -291,27 +289,16 @@
|
|
|
291
289
|
position: absolute;
|
|
292
290
|
top: calc(50% - 14px);
|
|
293
291
|
right: 2px;
|
|
294
|
-
transition: top
|
|
292
|
+
transition: top var(--te-smooth) 0.15s;
|
|
293
|
+
box-shadow: 0 0 0 var(--su-static2) var(--theme-topbar-background-color);
|
|
295
294
|
}
|
|
296
295
|
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// CTAs: Sign in, Sign up, etc. on the far right
|
|
300
|
-
.s-topbar .s-topbar--ctas {
|
|
301
|
-
padding-left: @su4;
|
|
302
|
-
padding-right: @su8;
|
|
303
|
-
overflow-x: auto; // Allow this content to scroll if it gets too long
|
|
304
|
-
@scrollbar-styles(); // Style the scrollbars
|
|
305
|
-
margin-left: auto; // Push this section as far to the right as possible
|
|
306
|
-
|
|
307
|
-
li + li {
|
|
308
|
-
margin-left: @su4;
|
|
309
|
-
}
|
|
310
296
|
|
|
311
|
-
|
|
297
|
+
// provide only layout styling for unset items
|
|
298
|
+
.s-topbar--item__unset {
|
|
312
299
|
align-self: center;
|
|
313
|
-
padding-top:
|
|
314
|
-
padding-bottom:
|
|
300
|
+
padding-top: var(--su8);
|
|
301
|
+
padding-bottom: var(--su8);
|
|
315
302
|
}
|
|
316
303
|
}
|
|
317
304
|
|
|
@@ -322,10 +309,10 @@
|
|
|
322
309
|
&:extend(.s-badge);
|
|
323
310
|
|
|
324
311
|
text-transform: uppercase;
|
|
325
|
-
font-size:
|
|
312
|
+
font-size: var(--fs-fine);
|
|
326
313
|
font-weight: 700;
|
|
327
|
-
margin-left:
|
|
328
|
-
margin-right:
|
|
314
|
+
margin-left: var(--su8);
|
|
315
|
+
margin-right: var(--su8);
|
|
329
316
|
flex-shrink: 0;
|
|
330
317
|
|
|
331
318
|
.badge-styles(transparent, transparent, var(--theme-topbar-item-color));
|
|
@@ -349,8 +336,8 @@
|
|
|
349
336
|
// $ SEARCHBAR
|
|
350
337
|
// ---------------------------------------------------------------------------
|
|
351
338
|
.s-topbar .s-topbar--searchbar {
|
|
352
|
-
@inputLineHeights:
|
|
353
|
-
padding: 0
|
|
339
|
+
@inputLineHeights: var(--lh-sm); // Ensure the line heights between the elements match up
|
|
340
|
+
padding: 0 var(--su8);
|
|
354
341
|
display: flex;
|
|
355
342
|
align-items: center;
|
|
356
343
|
flex-shrink: 10000; // Force the searchbar to shrink as much as possible if there's no extra space
|
|
@@ -393,7 +380,7 @@
|
|
|
393
380
|
|
|
394
381
|
&:before,
|
|
395
382
|
&:after {
|
|
396
|
-
z-index:
|
|
383
|
+
z-index: var(--zi-active); // Make sure our focus ring is above the search input
|
|
397
384
|
}
|
|
398
385
|
}
|
|
399
386
|
|
|
@@ -409,7 +396,7 @@
|
|
|
409
396
|
&:focus {
|
|
410
397
|
border-color: var(--theme-topbar-search-border-focus);
|
|
411
398
|
box-shadow: var(--theme-topbar-search-shadow-focus);
|
|
412
|
-
z-index:
|
|
399
|
+
z-index: var(--zi-selected);
|
|
413
400
|
}
|
|
414
401
|
}
|
|
415
402
|
|
|
@@ -425,7 +412,7 @@
|
|
|
425
412
|
right: 0;
|
|
426
413
|
top: 100%;
|
|
427
414
|
max-width: 100%;
|
|
428
|
-
padding:
|
|
415
|
+
padding: var(--su8) var(--su12);
|
|
429
416
|
background: var(--theme-topbar-item-background-hover);
|
|
430
417
|
|
|
431
418
|
&.s-topbar--searchbar__open {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
.s-uploader {
|
|
10
10
|
align-items: center;
|
|
11
11
|
background-color: var(--black-025);
|
|
12
|
-
border-radius:
|
|
12
|
+
border-radius: var(--br-lg);
|
|
13
13
|
display: flex;
|
|
14
|
-
min-height:
|
|
14
|
+
min-height: var(--su-static128);
|
|
15
15
|
justify-content: center;
|
|
16
|
-
padding:
|
|
16
|
+
padding: var(--su8) var(--su16);
|
|
17
17
|
position: relative;
|
|
18
18
|
text-align: center;
|
|
19
19
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
background-color: var(--black-150);
|
|
31
31
|
-webkit-mask-image: var(--s-uploader-background-image);
|
|
32
32
|
mask-image: var(--s-uploader-background-image);
|
|
33
|
-
border-radius:
|
|
33
|
+
border-radius: var(--br-lg);
|
|
34
34
|
|
|
35
35
|
.highcontrast-mode({
|
|
36
36
|
background-color: var(--black-400);
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
|
|
118
118
|
&:focus:focus-visible + .s-uploader--container {
|
|
119
119
|
background-color: var(--black-050);
|
|
120
|
-
box-shadow: 0 0 0
|
|
120
|
+
box-shadow: 0 0 0 var(--su-static4) var(--focus-ring);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -128,9 +128,9 @@
|
|
|
128
128
|
|
|
129
129
|
.s-uploader--preview-thumbnail {
|
|
130
130
|
background-color: var(--white);
|
|
131
|
-
border-radius:
|
|
131
|
+
border-radius: var(--br-sm);
|
|
132
132
|
box-shadow: var(--bs-md);
|
|
133
|
-
max-height:
|
|
133
|
+
max-height: var(--su-static128);
|
|
134
134
|
max-width: 100%;
|
|
135
135
|
overflow: hidden;
|
|
136
136
|
text-overflow: ellipsis;
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
&:not(img) {
|
|
147
|
-
padding:
|
|
147
|
+
padding: var(--su16);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -155,19 +155,19 @@
|
|
|
155
155
|
&.has-multiple {
|
|
156
156
|
display: block;
|
|
157
157
|
height: auto;
|
|
158
|
-
padding:
|
|
158
|
+
padding: var(--su8) var(--su2);
|
|
159
159
|
width: 100%;
|
|
160
160
|
|
|
161
161
|
.s-uploader--preview {
|
|
162
162
|
align-items: center;
|
|
163
163
|
display: flex;
|
|
164
|
-
padding:
|
|
164
|
+
padding: var(--su6) 0;
|
|
165
165
|
width: 100%;
|
|
166
166
|
|
|
167
167
|
&:after {
|
|
168
168
|
content: attr(data-filename);
|
|
169
169
|
display: block;
|
|
170
|
-
margin-left:
|
|
170
|
+
margin-left: var(--su12);
|
|
171
171
|
max-width: 100%;
|
|
172
172
|
overflow: hidden;
|
|
173
173
|
text-overflow: ellipsis;
|
|
@@ -177,9 +177,9 @@
|
|
|
177
177
|
|
|
178
178
|
.s-uploader--preview-thumbnail {
|
|
179
179
|
color: transparent;
|
|
180
|
-
height:
|
|
180
|
+
height: var(--su-static32);
|
|
181
181
|
flex-shrink: 0;
|
|
182
|
-
width:
|
|
182
|
+
width: var(--su-static32);
|
|
183
183
|
|
|
184
184
|
&:is(img) {
|
|
185
185
|
object-fit: cover;
|
|
@@ -196,15 +196,15 @@
|
|
|
196
196
|
|
|
197
197
|
.s-uploader--previews-heading {
|
|
198
198
|
color: var(--black-900);
|
|
199
|
-
font-size:
|
|
199
|
+
font-size: var(--fs-body2);
|
|
200
200
|
font-weight: 600;
|
|
201
|
-
padding-bottom:
|
|
201
|
+
padding-bottom: var(--su8);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
.s-uploader--reset {
|
|
205
205
|
position: absolute;
|
|
206
|
-
right:
|
|
207
|
-
top:
|
|
208
|
-
z-index:
|
|
206
|
+
right: var(--su8);
|
|
207
|
+
top: var(--su8);
|
|
208
|
+
z-index: var(--zi-active);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
.s-user-card {
|
|
14
14
|
display: grid;
|
|
15
15
|
grid-template-columns: auto 1fr;
|
|
16
|
-
column-gap:
|
|
17
|
-
row-gap:
|
|
16
|
+
column-gap: var(--su8);
|
|
17
|
+
row-gap: var(--su4);
|
|
18
18
|
align-items: center;
|
|
19
19
|
line-height: 1;
|
|
20
|
-
padding:
|
|
20
|
+
padding: var(--su8);
|
|
21
21
|
|
|
22
22
|
// ===========================================================================
|
|
23
23
|
// $ STYLE VARIATIONS
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
// ---------------------------------------------------------------------------
|
|
28
28
|
&.s-user-card__highlighted {
|
|
29
29
|
background-color: var(--theme-secondary-050);
|
|
30
|
-
border-radius:
|
|
30
|
+
border-radius: var(--br-md);
|
|
31
31
|
|
|
32
32
|
.s-user-card--type {
|
|
33
33
|
color: var(--black-700);
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
align-items: start;
|
|
41
41
|
|
|
42
42
|
.s-user-card--link {
|
|
43
|
-
font-size:
|
|
43
|
+
font-size: var(--fs-body2);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
&.s-user-card__small {
|
|
56
56
|
display: flex;
|
|
57
57
|
align-items: center;
|
|
58
|
-
gap:
|
|
58
|
+
gap: var(--su4);
|
|
59
59
|
padding: 0;
|
|
60
60
|
|
|
61
61
|
.s-user-card--info {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
&.s-user-card__minimal {
|
|
70
70
|
display: flex;
|
|
71
71
|
align-items: center;
|
|
72
|
-
gap:
|
|
72
|
+
gap: var(--su4);
|
|
73
73
|
padding: 0;
|
|
74
74
|
|
|
75
75
|
.s-user-card--time {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
|
|
93
93
|
.s-user-card--type {
|
|
94
94
|
grid-column: ~"1 / 3";
|
|
95
|
-
font-size:
|
|
95
|
+
font-size: var(--fs-caption);
|
|
96
96
|
color: var(--theme-primary-400);
|
|
97
97
|
|
|
98
98
|
a {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
grid-column: ~"1 / 3";
|
|
109
109
|
grid-row: ~"1 / 2";
|
|
110
110
|
color: var(--black-500);
|
|
111
|
-
font-size:
|
|
111
|
+
font-size: var(--fs-caption);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// $ USER INFO CONTAINER
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
.s-user-card--info {
|
|
119
119
|
display: flex;
|
|
120
120
|
flex-direction: column;
|
|
121
|
-
gap:
|
|
121
|
+
gap: var(--su4);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// $ USER LINK
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
// ---------------------------------------------------------------------------
|
|
127
127
|
.s-user-card--link {
|
|
128
128
|
min-width: 0; // Allow things to wrap
|
|
129
|
-
font-size:
|
|
129
|
+
font-size: var(--fs-caption);
|
|
130
130
|
align-items: center;
|
|
131
131
|
flex-wrap: wrap;
|
|
132
132
|
overflow-wrap: break-word;
|
|
@@ -139,10 +139,10 @@
|
|
|
139
139
|
.list-reset;
|
|
140
140
|
display: flex;
|
|
141
141
|
align-items: center;
|
|
142
|
-
gap:
|
|
142
|
+
gap: var(--su6);
|
|
143
143
|
|
|
144
144
|
li {
|
|
145
|
-
font-size:
|
|
145
|
+
font-size: var(--fs-caption);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
// ---------------------------------------------------------------------------
|
|
156
156
|
.s-user-card--location,
|
|
157
157
|
.s-user-card--role {
|
|
158
|
-
font-size:
|
|
158
|
+
font-size: var(--fs-caption);
|
|
159
159
|
color: var(--black-500);
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file only sets the colors for the "current color" highlight when the
|
|
10
10
|
// widget is used for navigation. This is the only part of the widget that is
|
|
11
11
|
// dynamically configurable; the rest can be served in the static part of Stacks
|
|
12
|
-
// and is in
|
|
12
|
+
// and is in widget-static.less.
|
|
13
13
|
|
|
14
14
|
.s-sidebarwidget--item {
|
|
15
15
|
&,
|
|
@@ -9,23 +9,22 @@
|
|
|
9
9
|
// This file contains almost all the CSS for the sidebar widget. The only exception
|
|
10
10
|
// is the "current color" highlight when the widget is used for navigation. That
|
|
11
11
|
// part is configurable and is in the dynamic part of Stacks as
|
|
12
|
-
//
|
|
12
|
+
// widget-dynamic.less.
|
|
13
13
|
|
|
14
|
+
.s-sidebarwidget {
|
|
15
|
+
--s-sidebarwidget-content-padding: calc(var(--su16) - var(--su1)); // subtract 1px for border
|
|
16
|
+
--s-sidebarwidget-content-inner-spacing: var(--su12); // the spacing between two adjacent simple items
|
|
17
|
+
--s-sidebarwidget-content-outer-spacing: var(--su16); // the spacing at the start/end of a group of simple items, as well as between a complex item and its separator line
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@s-sidebarwidget-outer-border-color: var(--bc-medium);
|
|
20
|
-
@s-sidebarwidget-content-separator-color: var(--bc-light);
|
|
21
|
-
@s-sidebarwidget-header-background-color: var(--black-025);
|
|
19
|
+
--s-sidebarwidget-outer-border-color: var(--bc-medium);
|
|
20
|
+
--s-sidebarwidget-content-separator-color: var(--bc-light);
|
|
21
|
+
--s-sidebarwidget-header-background-color: var(--black-025);
|
|
22
22
|
|
|
23
|
-
.s-sidebarwidget {
|
|
24
23
|
position: relative; // so that it's the positioning parent for the :after
|
|
25
|
-
border: 1px solid
|
|
26
|
-
border-radius:
|
|
24
|
+
border: 1px solid var(--s-sidebarwidget-outer-border-color);
|
|
25
|
+
border-radius: var(--br-sm);
|
|
27
26
|
box-shadow: var(--bs-sm);
|
|
28
|
-
font-size:
|
|
27
|
+
font-size: var(--fs-body1);
|
|
29
28
|
background-color: var(--white);
|
|
30
29
|
|
|
31
30
|
&:not(.s-anchors) a:not(.button):not(.s-btn):not(.post-tag):not(.s-sidebarwidget--action):not(.s-user-card--link) {
|
|
@@ -61,9 +60,10 @@
|
|
|
61
60
|
top: -1px;
|
|
62
61
|
right: -1px;
|
|
63
62
|
left: -1px;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
border-
|
|
63
|
+
// TODO: this makes no sense. revisit.
|
|
64
|
+
height: calc(2px + var(--br-sm)); // we need 2px border + 2px border radius to have the correct corner shape
|
|
65
|
+
border-top: 1px solid var(--s-sidebarwidget-outer-border-color);
|
|
66
|
+
border-radius: var(--br-sm);
|
|
67
67
|
pointer-events: none; // if the top item is clickable, then we don't want to prevent clicking the top 2 pixels
|
|
68
68
|
|
|
69
69
|
// In order to also perfectly recreate the inner corner shape, our pseudo-element needs
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
@supports ((-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)) or (clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%))) or (-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)) {
|
|
73
73
|
-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%);
|
|
74
74
|
clip-path: polygon(0% 0%, 100% 0%, 100% 50%, 0% 50%);
|
|
75
|
-
border: 1px solid
|
|
75
|
+
border: 1px solid var(--s-sidebarwidget-outer-border-color);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.s-sidebarwidget--header,
|
|
81
81
|
.s-sidebarwidget--content {
|
|
82
|
-
border-top: 1px solid
|
|
82
|
+
border-top: 1px solid var(--s-sidebarwidget-content-separator-color);
|
|
83
83
|
|
|
84
84
|
&:active {
|
|
85
85
|
outline: none;
|
|
@@ -88,23 +88,23 @@
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
.s-sidebarwidget--header {
|
|
91
|
-
padding:
|
|
92
|
-
background:
|
|
91
|
+
padding: var(--s-sidebarwidget-content-inner-spacing) var(--s-sidebarwidget-content-padding);
|
|
92
|
+
background: var(--s-sidebarwidget-header-background-color);
|
|
93
93
|
color: var(--black-600);
|
|
94
|
-
font-size:
|
|
94
|
+
font-size: var(--fs-body2);
|
|
95
95
|
font-weight: normal;
|
|
96
96
|
|
|
97
97
|
&:first-child {
|
|
98
|
-
border-top-left-radius:
|
|
99
|
-
border-top-right-radius:
|
|
98
|
+
border-top-left-radius: var(--br-sm);
|
|
99
|
+
border-top-right-radius: var(--br-sm);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
&.s-sidebarwidget__small-bold-text {
|
|
103
|
-
font-size:
|
|
103
|
+
font-size: var(--fs-caption);
|
|
104
104
|
font-weight: bold;
|
|
105
105
|
.-action {
|
|
106
106
|
font-weight: normal;
|
|
107
|
-
line-height: 1.3 *
|
|
107
|
+
line-height: calc(1.3 * var(--fs-caption)); // line-height should be the same as in the outside element, so the header and action baselines line up
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
content: '';
|
|
115
115
|
float: left;
|
|
116
116
|
margin-top: ~"calc(1.3em / 2 - 5px)"; // 1.3 is our standard line height
|
|
117
|
-
margin-right:
|
|
117
|
+
margin-right: var(--su12);
|
|
118
118
|
border: 5px solid transparent;
|
|
119
119
|
border-left-color: var(--bc-darker);
|
|
120
120
|
border-right-width: 0;
|
|
@@ -131,16 +131,16 @@
|
|
|
131
131
|
|
|
132
132
|
.s-sidebarwidget--action {
|
|
133
133
|
float: right;
|
|
134
|
-
margin: 0 0
|
|
134
|
+
margin: 0 0 var(--su4) var(--su8);
|
|
135
135
|
color: var(--blue);
|
|
136
|
-
font-size:
|
|
136
|
+
font-size: var(--fs-fine);
|
|
137
137
|
line-height: 1.3 * 15px; // line-height should be the same as in the outside element, so the header and action baselines line up
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
table.s-sidebarwidget--content.s-sidebarwidget__items {
|
|
141
|
-
padding: (
|
|
141
|
+
padding: calc(var(--s-sidebarwidget-content-outer-spacing) - var(--s-sidebarwidget-content-inner-spacing)) calc(var(--s-sidebarwidget-content-padding) - var(--s-sidebarwidget-content-inner-spacing));
|
|
142
142
|
border-collapse: separate;
|
|
143
|
-
border-spacing:
|
|
143
|
+
border-spacing: var(--s-sidebarwidget-content-inner-spacing);
|
|
144
144
|
|
|
145
145
|
tr.-item {
|
|
146
146
|
display: table-row;
|
|
@@ -161,12 +161,12 @@ table.s-sidebarwidget--content.s-sidebarwidget__items {
|
|
|
161
161
|
|
|
162
162
|
.s-sidebarwidget--content {
|
|
163
163
|
margin: 0;
|
|
164
|
-
padding:
|
|
164
|
+
padding: var(--s-sidebarwidget-content-outer-spacing) var(--s-sidebarwidget-content-padding);
|
|
165
165
|
|
|
166
166
|
&.s-sidebarwidget__items {
|
|
167
167
|
display: block;
|
|
168
168
|
// the items themselves provide part of the spacing, so the content padding needs to account for that
|
|
169
|
-
padding: (
|
|
169
|
+
padding: calc(var(--s-sidebarwidget-content-outer-spacing) - var(--s-sidebarwidget-content-inner-spacing)) var(--s-sidebarwidget-content-padding);
|
|
170
170
|
&.s-sidebarwidget__block-items .s-sidebarwidget--item {
|
|
171
171
|
.d-block;
|
|
172
172
|
}
|
|
@@ -174,7 +174,7 @@ table.s-sidebarwidget--content.s-sidebarwidget__items {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.s-sidebarwidget--item {
|
|
177
|
-
margin:
|
|
177
|
+
margin: var(--s-sidebarwidget-content-inner-spacing) 0;
|
|
178
178
|
|
|
179
179
|
&,
|
|
180
180
|
& > :first-child {
|
|
@@ -188,12 +188,12 @@ table.s-sidebarwidget--content.s-sidebarwidget__items {
|
|
|
188
188
|
content: '';
|
|
189
189
|
position: absolute;
|
|
190
190
|
left: 0;
|
|
191
|
-
height:
|
|
192
|
-
margin-top:
|
|
193
|
-
margin-left:
|
|
191
|
+
height: calc(100% + var(--s-sidebarwidget-content-inner-spacing));
|
|
192
|
+
margin-top: calc(var(--s-sidebarwidget-content-inner-spacing) / 2 * -1);
|
|
193
|
+
margin-left: calc(var(--s-sidebarwidget-content-padding) * -1 - 1px); // the orange selection indicator overlaps with the widget border
|
|
194
194
|
border-left-width: 3px;
|
|
195
195
|
border-left-style: solid;
|
|
196
|
-
// border-left-color is set in
|
|
196
|
+
// border-left-color is set in widget-dynamic.less
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
a,
|
|
@@ -203,10 +203,11 @@ table.s-sidebarwidget--content.s-sidebarwidget__items {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
+
|
|
206
207
|
.s-sidebarwidget--subnav {
|
|
207
208
|
list-style-type: none;
|
|
208
209
|
padding-left: 0;
|
|
209
|
-
margin-left:
|
|
210
|
+
margin-left: var(--su8);
|
|
210
211
|
|
|
211
212
|
li {
|
|
212
213
|
margin-top: 12px;
|
|
@@ -219,7 +220,7 @@ table.s-sidebarwidget--content.s-sidebarwidget__items {
|
|
|
219
220
|
|
|
220
221
|
&[aria-current="true"],
|
|
221
222
|
&[aria-current="page"] {
|
|
222
|
-
// this is given a bullet-arrow in the primary color in
|
|
223
|
+
// this is given a bullet-arrow in the primary color in widget-dynamic.less
|
|
223
224
|
color: var(--black);
|
|
224
225
|
font-weight: bold;
|
|
225
226
|
|