@stackoverflow/stacks 3.0.0-beta.3 → 3.0.0-beta.30

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 (108) hide show
  1. package/dist/controllers.d.ts +0 -2
  2. package/dist/css/stacks.css +14245 -15086
  3. package/dist/css/stacks.min.css +1 -1
  4. package/dist/js/stacks.js +0 -364
  5. package/dist/js/stacks.min.js +1 -1
  6. package/lib/atomic/backgrounds.less +67 -0
  7. package/lib/atomic/border-radius.less +38 -0
  8. package/lib/atomic/borders.less +73 -0
  9. package/lib/atomic/box-shadow.less +29 -0
  10. package/lib/atomic/box-sizing.less +3 -0
  11. package/lib/atomic/current-color.less +2 -0
  12. package/lib/atomic/cursors.less +8 -0
  13. package/lib/atomic/display.less +15 -0
  14. package/lib/atomic/flex.less +6 -34
  15. package/lib/atomic/floats.less +20 -0
  16. package/lib/atomic/gap.less +2 -0
  17. package/lib/atomic/grid.less +2 -0
  18. package/lib/atomic/height.less +22 -0
  19. package/lib/atomic/interactivity.less +45 -0
  20. package/lib/atomic/lists.less +29 -0
  21. package/lib/atomic/margin.less +48 -0
  22. package/lib/atomic/object-fit.less +9 -0
  23. package/lib/atomic/opacity.less +54 -0
  24. package/lib/atomic/outline.less +11 -0
  25. package/lib/atomic/overflow.less +17 -0
  26. package/lib/atomic/padding.less +12 -0
  27. package/lib/atomic/positioning.less +41 -0
  28. package/lib/atomic/sizing.less +51 -0
  29. package/lib/atomic/transitions.less +20 -0
  30. package/lib/atomic/truncation.less +58 -0
  31. package/lib/atomic/typography.less +71 -137
  32. package/lib/atomic/vertical-alignment.less +9 -0
  33. package/lib/atomic/visibility.less +18 -0
  34. package/lib/atomic/width.less +27 -0
  35. package/lib/atomic/z-index.less +12 -0
  36. package/lib/base/body.less +2 -4
  37. package/lib/base/configuration-static.less +3 -3
  38. package/lib/base/internal.less +3 -5
  39. package/lib/base/reset-normalize.less +3 -3
  40. package/lib/components/activity-indicator/activity-indicator.less +4 -20
  41. package/lib/components/anchor/anchor.less +28 -39
  42. package/lib/components/avatar/avatar.less +20 -19
  43. package/lib/components/badge/badge.less +227 -167
  44. package/lib/components/banner/banner.less +12 -11
  45. package/lib/components/bling/bling.less +47 -10
  46. package/lib/components/button/button.less +300 -380
  47. package/lib/components/checkbox_radio/checkbox_radio.less +195 -113
  48. package/lib/components/code-block/code-block.fixtures.ts +2 -2
  49. package/lib/components/code-block/code-block.less +2 -3
  50. package/lib/components/description/description.less +17 -2
  51. package/lib/components/empty-state/empty-state.less +17 -6
  52. package/lib/components/form-group/form-group.less +38 -0
  53. package/lib/components/input-fill/input-fill.less +3 -3
  54. package/lib/components/input-icon/input-icon.less +3 -3
  55. package/lib/components/input-message/input-message.less +1 -0
  56. package/lib/components/input_textarea/input_textarea.less +71 -58
  57. package/lib/components/label/label.less +12 -56
  58. package/lib/components/link/link.less +44 -98
  59. package/lib/components/loader/loader.less +88 -0
  60. package/lib/components/menu/menu.less +89 -19
  61. package/lib/components/modal/modal.less +10 -10
  62. package/lib/components/navigation/navigation.less +77 -42
  63. package/lib/components/notice/notice.less +90 -75
  64. package/lib/components/pagination/pagination.less +50 -42
  65. package/lib/components/popover/popover.less +9 -11
  66. package/lib/components/post-summary/post-summary.less +225 -385
  67. package/lib/components/prose/prose.less +49 -35
  68. package/lib/components/select/select.less +46 -41
  69. package/lib/components/sidebar-widget/sidebar-widget.less +26 -196
  70. package/lib/components/table/table.less +48 -22
  71. package/lib/components/tag/tag.less +25 -6
  72. package/lib/components/toast/toast.less +4 -2
  73. package/lib/components/toggle-switch/toggle-switch.less +15 -19
  74. package/lib/components/user-card/user-card.less +129 -92
  75. package/lib/components/vote/vote.less +134 -0
  76. package/lib/controllers.ts +0 -2
  77. package/lib/exports/color-sets.less +108 -81
  78. package/lib/exports/constants-helpers.less +9 -13
  79. package/lib/exports/constants-type.less +18 -36
  80. package/lib/exports/mixins.less +92 -272
  81. package/lib/index.ts +0 -4
  82. package/lib/stacks-static.less +44 -30
  83. package/lib/test/visual-test-utils.ts +42 -10
  84. package/lib/tsconfig.json +1 -1
  85. package/package.json +1 -1
  86. package/dist/components/expandable/expandable.d.ts +0 -17
  87. package/dist/components/uploader/uploader.d.ts +0 -48
  88. package/lib/atomic/border.less +0 -121
  89. package/lib/atomic/misc.less +0 -374
  90. package/lib/atomic/spacing.less +0 -98
  91. package/lib/atomic/width-height.less +0 -194
  92. package/lib/components/block-link/block-link.less +0 -82
  93. package/lib/components/breadcrumbs/breadcrumbs.less +0 -41
  94. package/lib/components/button-group/button-group.less +0 -81
  95. package/lib/components/card/card.less +0 -37
  96. package/lib/components/check-control/check-control.less +0 -17
  97. package/lib/components/check-group/check-group.less +0 -19
  98. package/lib/components/expandable/expandable.less +0 -119
  99. package/lib/components/expandable/expandable.ts +0 -238
  100. package/lib/components/link-preview/link-preview.less +0 -148
  101. package/lib/components/page-title/page-title.less +0 -51
  102. package/lib/components/progress-bar/progress-bar.less +0 -292
  103. package/lib/components/skeleton/skeleton.less +0 -73
  104. package/lib/components/spinner/spinner.less +0 -103
  105. package/lib/components/topbar/topbar.less +0 -553
  106. package/lib/components/uploader/uploader.less +0 -205
  107. package/lib/components/uploader/uploader.ts +0 -207
  108. package/lib/exports/spacing-mixins.less +0 -67
@@ -4,7 +4,7 @@
4
4
  @pr-spacing-condensed: calc(@pr-spacing / 2); // Reduce the base spacing by half in the context of lists, etc.
5
5
  @pr-spoiler-transition: opacity 0.1s ease-in-out;
6
6
  // COMPONENT-SPECIFIC CUSTOM PROPERTIES
7
- --_pr-fs: calc(var(--su-static16) - var(--su-static1)); // Force a font size that doesn’t change at the smallest breakpoint;
7
+ --_pr-fs: unset;
8
8
  --_pr-lh: 1.5;
9
9
  --_pr-blockquote-ml: 1em;
10
10
  --_pr-blockquote-mt: 0;
@@ -19,7 +19,7 @@
19
19
  --_pr-hr-bg: var(--black-225); // used for both background-color and color properties
20
20
  --_pr-img-mb: @pr-spacing;
21
21
  --_pr-kbd-bc: var(--black-300);
22
- --_pr-kbd-bs: 0 var(--su-static1) var(--su-static1) hsla(210, 8%, 5%, 0.15), inset 0 1px 0 0 var(--_white-static);
22
+ --_pr-kbd-bs: 0 var(--su1) var(--su1) hsla(210, 8%, 5%, 0.15), inset 0 1px 0 0 var(--_white-static);
23
23
  --_pr-spoiler-cursor: pointer;
24
24
  --_pr-spoiler-after-t: 1em;
25
25
  --_pr-soiler-after-o: unset;
@@ -33,7 +33,7 @@
33
33
  .dark-mode({
34
34
  --_pr-kbd-bc: transparent;
35
35
  --_pr-kbd-btc: var(--black-400);
36
- --_pr-kbd-bs: 0 var(--su-static1) var(--su-static1) hsla(210, 8%, 5%, 0.8);
36
+ --_pr-kbd-bs: 0 var(--su1) var(--su1) hsla(210, 8%, 5%, 0.8);
37
37
  });
38
38
 
39
39
  .highcontrast-mode({
@@ -46,29 +46,15 @@
46
46
  });
47
47
 
48
48
  // MODIFIERS
49
- &&__xs,
50
- &&__sm,
51
- &&__md {
52
- --_pr-h1-fs: var(--fs-headline1-relative);
53
- --_pr-h2-fs: var(--fs-title-relative);
54
- --_pr-h3-fs: var(--fs-subheading-relative);
55
- --_pr-h4-fs: var(--fs-body3-relative);
56
- --_pr-h5-fs: var(--fs-body2-relative);
57
- }
58
-
59
- &&__xs {
60
- --_pr-fs: var(--fs-caption);
61
- --_pr-lh: var(--lh-sm);
62
- }
63
-
64
49
  &&__sm {
65
- --_pr-fs: var(--fs-body1);
50
+ --_pr-h1-fs: 1.75em;
51
+ --_pr-h2-fs: 1.375em;
52
+ --_pr-h3-fs: 1.25em;
53
+ --_pr-h4-fs: 1.125em;
54
+ --_pr-h5-fs: 1em;
55
+ --_pr-fs: var(--fs-caption);
66
56
  --_pr-lh: var(--lh-md);
67
- }
68
-
69
- &&__md {
70
- --_pr-fs: var(--fs-body3);
71
- --_pr-lh: var(--lh-xl);
57
+ --_pr-code-fs: var(--fs-caption);
72
58
  }
73
59
 
74
60
  // CHILD ELEMENTS
@@ -77,11 +63,13 @@
77
63
  color: var(--theme-link-color, var(--theme-secondary-400)); // When contained within a link, we want the code to be link-colored
78
64
  }
79
65
 
66
+ // Code blocks use ems to maintain sizes relative to the surrounding text
80
67
  > code {
81
- padding: var(--su2) var(--su4);
82
- color: var(--black-600);
83
68
  background-color: var(--black-200);
84
- border-radius: var(--br-md);
69
+ color: var(--black-600);
70
+ // TODO verify this font size is appropriate with a Windows font stack
71
+ font-size: .875em;
72
+ padding: 0.1875em 0.375em;
85
73
  }
86
74
  }
87
75
 
@@ -178,6 +166,28 @@
178
166
  }
179
167
 
180
168
  // Others child elements
169
+ // Base anchor styles match .s-link; use theme/fallback directly for color so hover/visited apply
170
+ // (see lib/components/link/link.less)
171
+ a:not([class]) {
172
+ &:active,
173
+ &:hover {
174
+ color: var(--theme-link-color-hover, var(--blue-400));
175
+ text-decoration: underline !important;
176
+ }
177
+ &:visited {
178
+ color: var(--theme-link-color-visited, var(--black-400));
179
+ }
180
+
181
+ &:hover:visited {
182
+ color: var(--theme-link-color-hover, var(--blue-400));
183
+ text-decoration: underline !important;
184
+ }
185
+
186
+ color: var(--theme-link-color, var(--black-600));
187
+ cursor: pointer;
188
+ user-select: auto;
189
+ }
190
+
181
191
  blockquote,
182
192
  q {
183
193
  quotes: none;
@@ -232,7 +242,7 @@
232
242
  margin-bottom: calc(@pr-spacing-condensed + 0.1em); // Add some more spacing on the bottom for a little extra optical alignment
233
243
  }
234
244
 
235
- margin-bottom:@pr-spacing;
245
+ margin-bottom: @pr-spacing;
236
246
  margin-top: 0;
237
247
  }
238
248
 
@@ -247,7 +257,7 @@
247
257
  &:before {
248
258
  background: var(--_pr-blockquote-before-bg);
249
259
 
250
- border-radius: var(--su-static8);
260
+ border-radius: var(--su8);
251
261
  bottom: 0;
252
262
  content: "";
253
263
  display: block;
@@ -299,7 +309,7 @@
299
309
  color: var(--_pr-hr-bg); // value set for background-color reused for color intentionally
300
310
 
301
311
  border: 0;
302
- height: var(--su-static1);
312
+ height: var(--su1);
303
313
  margin-bottom: @pr-spacing;
304
314
  }
305
315
 
@@ -311,7 +321,7 @@
311
321
  }
312
322
 
313
323
  kbd {
314
- border: var(--su-static1) solid var(--_pr-kbd-bc);
324
+ border: var(--su1) solid var(--_pr-kbd-bc);
315
325
  border-top-color: var(--_pr-kbd-btc, var(--_pr-kbd-bc));
316
326
  box-shadow: var(--_pr-kbd-bs);
317
327
 
@@ -325,7 +335,7 @@
325
335
  margin: 0 0.1em;
326
336
  overflow-wrap: break-word;
327
337
  padding: 0.1em 0.6em;
328
- text-shadow: 0 var(--su-static1) 0 var(--white);
338
+ text-shadow: 0 var(--su1) 0 var(--white);
329
339
  }
330
340
 
331
341
  li {
@@ -342,6 +352,10 @@
342
352
  p {
343
353
  --_pr-img-mb: 0;
344
354
 
355
+ a:not([class]) {
356
+ text-decoration: underline;
357
+ }
358
+
345
359
  margin-bottom: @pr-spacing;
346
360
  }
347
361
 
@@ -403,7 +417,7 @@
403
417
 
404
418
  > * {
405
419
  opacity: var(--_pr-soiler-child-o);
406
- transition: @pr-spoiler-transition;
420
+ transition: var(--_pr-spoiler-transition);
407
421
  visibility: var(--_pr-soiler-child-visibility); // hidden elements don't respond to mouse events, but still retain their space
408
422
  }
409
423
 
@@ -412,7 +426,7 @@
412
426
  background: var(--black-150);
413
427
  border-radius: var(--br-md);
414
428
  color: var(--black-600);
415
- min-height: var(--su-static48); // TODO: Let's find a solution that doesn't have a magic number
429
+ min-height: var(--su48); // TODO: Let's find a solution that doesn't have a magic number
416
430
  }
417
431
 
418
432
  .youtube-embed { // [2]
@@ -434,7 +448,7 @@
434
448
  width: 100%;
435
449
  }
436
450
 
437
- font-size: var(--_pr-fs); // Force a font size that doesn’t change at the smallest breakpoint
451
+ font-size: var(--_pr-fs);
438
452
  line-height: var(--_pr-lh);
439
453
 
440
454
  overflow-wrap: break-word;
@@ -1,17 +1,17 @@
1
1
  .s-select {
2
- --_se-arrow-bc: currentColor transparent;
3
- --_se-arrow-size: var(--su-static4); // Constant
2
+ --_se-arrow-fc: currentColor;
4
3
  --_se-select-bc: var(--bc-darker);
5
4
  --_se-select-bg: var(--white);
6
5
  --_se-select-br: var(--br-md);
7
6
  --_se-select-fc: var(--black);
8
7
  --_se-select-px: 0.7em;
9
- --_se-select-py: 0.6em;
8
+ --_se-select-py: var(--su8);
10
9
  --_se-select-fs: var(--fs-body1);
10
+ --_se-select-lh: var(--lh-base);
11
11
 
12
12
  // CONTEXTUAL STYLES
13
13
  @supports (-webkit-overflow-scrolling: touch) {
14
- --_se-select-fs: var(--su-static16); // Increase font size for mobile safari. This keeps our inputs from zooming the page while focused
14
+ --_se-select-fs: var(--su16); // Increase font size for mobile safari. This keeps our inputs from zooming the page while focused
15
15
  --_se-select-px: 0.55em; // Compensate for the larger font size so we generally keep the input the same size
16
16
  --_se-select-py: 0.4em; // Compensate for the larger font size so we generally keep the input the same size
17
17
  }
@@ -23,58 +23,62 @@
23
23
 
24
24
  .validation-states(se-select);
25
25
 
26
- .is-disabled & {
27
- --_se-arrow-bc: var(--bc-dark) transparent;
28
- }
29
-
30
26
  &&__sm {
31
- .size-styles(sm; se-select; @styles: fs);
32
- // --_se-select-fs: var(--fs-caption);
33
- }
34
-
35
- &&__md {
36
- .size-styles(md; se-select; @styles: br, fs);
37
- --_se-select-py: 0.5em;
27
+ --_se-select-fs: var(--fs-caption);
28
+ --_se-select-lh: var(--lh-sm);
29
+ --_se-select-py: calc(var(--su6) - var(--su1) / 2);
38
30
  }
39
31
 
40
32
  &&__lg {
41
- .size-styles(lg; se-select; @styles: br, fs);
42
- --_se-select-px: 0.6em;
43
- --_se-select-py: 0.45em;
44
- }
45
-
46
- &&__xl {
47
- .size-styles(xl; se-select; @styles: br, fs);
48
- --_se-select-px: 0.5em;
49
- --_se-select-py: 0.4em;
33
+ --_se-select-fs: var(--fs-body3);
34
+ --_se-select-lh: var(--lh-lg);
50
35
  }
51
36
 
52
37
  // CHILD ELEMENTS
53
38
  select&,
54
39
  & > select {
55
- .webkit-autofill();
40
+ // TODO: Investigate if this is still needed.
41
+ &:-webkit-autofill {
42
+ &:focus {
43
+ border-color: var(--blue-400);
44
+ // Since the box shadow is overwritten to show a background, we have to re-add the focus outline
45
+ -webkit-box-shadow: 0 0 0 1000px var(--blue-200) inset, 0 0 0 var(--su4) var(--focus-ring);
46
+ }
47
+
48
+ -webkit-box-shadow: 0 0 0 1000px var(--theme-secondary-200) inset; // This acts as a background color by stretching an inset box shadow across the input
49
+ -webkit-text-fill-color: var(--black);
50
+ border-color: var(--blue-400);
51
+ transition: background-color 0s 50000s; // A hack to infinitely delay background styles that come from the browser.
52
+ }
53
+
54
+ &::-webkit-contacts-auto-fill-button {
55
+ background-color: var(--black); // In Safari, make the autocomplete button darkmode-aware
56
+ }
56
57
  }
57
58
 
58
- &:before,
59
- &:after { // menu arrows
60
- border-color: var(--_se-arrow-bc);
61
- border-style: solid;
62
- border-width: var(--_se-arrow-size);
59
+ &:after { // Chevron16UpDown icon
60
+ background-color: currentColor;
63
61
  content: "";
62
+ height: var(--su16);
63
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M13.06 10 8 15.06 2.94 10 4 8.94l.53.53L8 12.94l3.47-3.47.53-.53zm0-4L12 7.06l-.53-.53L8 3.06 4.53 6.53 4 7.06 2.94 6 8 .94z'/%3E%3C/svg%3E");
64
+ mask-repeat: no-repeat;
65
+ mask-position: center;
66
+ mask-size: contain;
64
67
  pointer-events: none;
65
68
  position: absolute;
66
- right: calc(var(--su-static12) + var(--su-static1));
69
+ right: calc(var(--su32) - var(--su24));
70
+ top: 50%;
71
+ transform: translateY(-50%);
72
+ width: var(--su16);
67
73
  z-index: var(--zi-selected);
68
74
  }
69
75
 
70
- &:after {
71
- border-bottom-width: 0;
72
- top: calc(50% + var(--su-static1));
73
- }
76
+ .is-disabled & {
77
+ --_se-arrow-fc: var(--bc-dark);
74
78
 
75
- &:before {
76
- border-top-width: 0;
77
- top: calc(50% - calc(var(--_se-arrow-size) + var(--su-static1)));
79
+ &:after {
80
+ background-color: var(--_se-arrow-fc);
81
+ }
78
82
  }
79
83
 
80
84
  > select { // Menu
@@ -82,7 +86,8 @@
82
86
  fieldset[disabled] &,
83
87
  &[disabled] {
84
88
  cursor: not-allowed;
85
- opacity: var(--_o-disabled-static);
89
+ --_se-select-fc: var(--black-300);
90
+ --_se-select-bg: var(--black-100);
86
91
  }
87
92
 
88
93
  &[readonly],
@@ -109,7 +114,7 @@
109
114
  }
110
115
 
111
116
  background-color: var(--_se-select-bg);
112
- border: var(--su-static1) solid var(--_se-select-bc);
117
+ border: var(--su1) solid var(--_se-select-bc);
113
118
  border-radius: var(--_se-select-br);
114
119
  color: var(--_se-select-fc);
115
120
  font-size: var(--_se-select-fs);
@@ -118,7 +123,7 @@
118
123
  appearance: none;
119
124
  font-family: inherit;
120
125
  height: 100%; // Fill the height of its parent
121
- line-height: var(--lh-sm);
126
+ line-height: var(--_se-select-lh);
122
127
  outline: 0;
123
128
  padding-right: var(--su32);
124
129
  position: relative; // This prevents Firefox from requiring a second click to select options
@@ -1,218 +1,48 @@
1
- .s-sidebarwidget {
2
- // COMPONENT-SPECIFIC CUSTOM PROPERTIES
3
- --_sw-bc: var(--bc-medium);
4
-
5
- // MODIFIERS
6
- &:not(.s-anchors) {
7
- a:not(.button):not(.s-tag):not(.post-tag):not(.s-btn):not(.s-sidebarwidget--action):not(.s-user-card--link) {
8
- &,
9
- &:visited {
10
- color: var(--black-600);
11
- }
12
- }
13
- }
14
-
15
- // VARIANTS
16
- .alternate-color(blue);
17
- .alternate-color(yellow);
18
- .alternate-color(green);
1
+ @headings: h1, h2, h3, h4, h5, h6;
19
2
 
3
+ .s-sidebarwidget {
20
4
  // CHILD ELEMENTS
21
- & &--action {
22
- color: var(--blue-400);
23
- font-size: var(--fs-body1);
24
- font-weight: normal;
25
- margin-left: auto;
26
- }
27
-
28
- & &--content {
29
- &:not(table) {
30
- &:not(.s-sidebarwidget__items),
31
- &:not(.s-sidebarwidget__block-items) .s-sidebarwidget--item {
32
- display: flex;
33
- }
34
- }
35
-
36
- + .s-sidebarwidget--content {
37
- border-top: var(--su-static1) solid var(--bc-light);
38
- }
39
-
40
- &.s-sidebarwidget__items {
41
- &,
42
- &.s-sidebarwidget__block-items .s-sidebarwidget--item {
43
- display: block;
44
- }
45
-
46
- padding: var(--su6) var(--su16); // the items themselves provide part of the spacing, so the content padding needs to account for that
5
+ & &--content {
6
+ .s-sidebarwidget--action {
7
+ font-size: var(--fs-fine);
8
+ margin-left: var(--su16);
9
+ align-self: flex-start;
47
10
  }
48
11
 
49
- &:active {
50
- outline: none;
51
- }
52
-
53
-
54
- margin: 0;
55
- padding: var(--su16);
12
+ display: flex;
13
+ padding: var(--su12) 0 var(--su16) 0;
14
+ font-size: var(--fs-body2);
56
15
  }
57
16
 
58
17
  & &--header {
59
- &:first-child {
60
- border-top: none;
61
- }
62
-
63
- + .s-expandable:not(.is-expanded) {
64
- margin-bottom: var(--su16);
65
- }
66
-
67
- &.s-sidebarwidget {
68
- &__expanding-control {
69
- &:before {
70
- border: calc(var(--su-static4) + var(--su-static1)) solid transparent;
71
- border-left-color: var(--black-400);
72
- border-right-width: 0;
73
- content: '';
74
- float: left;
75
- margin-right: var(--su12);
76
- margin-top: calc(calc(var(--lh-base) * 1em) / 2 - 5px); // 1.3 is our standard line height
77
- transition: transform 0.3s cubic-bezier(0.4, 0.4, 0.6, 1);
78
- }
79
-
80
- &[aria-expanded='true']:before {
81
- transform: rotate(90deg);
82
- }
83
-
84
- cursor: pointer;
85
- }
86
-
87
- &__small-bold-text {
88
- .s-sidebarwidget--action {
89
- font-weight: normal;
90
- line-height: calc(var(--lh-base) * var(--fs-caption)); // line-height should be the same as in the outside element, so the header and action baselines line up
91
- }
92
-
93
- font-size: var(--fs-caption);
94
- font-weight: bold;
95
- }
18
+ > @{headings} {
19
+ margin: 0;
20
+ padding-right: var(--su6);
21
+ font-size: var(--fs-body1);
22
+ font-weight: 500;
96
23
  }
97
24
 
98
- &:active {
99
- outline: none;
25
+ .s-sidebarwidget--action {
26
+ margin-left: auto;
100
27
  }
101
28
 
102
29
  align-items: center;
103
- border-top: var(--su-static1) solid var(--bc-light);
104
- color: var(--black-600);
105
30
  display: flex;
106
- font-size: var(--fs-body2);
107
- font-weight: bold;
108
- justify-content: flex-start;
109
- line-height: var(--lh-xs);
110
- margin: 0;
111
- padding: var(--su16) var(--su16) 0;
31
+ padding: var(--su4) 0;
112
32
  }
113
33
 
114
- & &--item {
115
- &,
116
- & > :first-child {
117
- &[aria-current="true"],
118
- &[aria-current="page"] {
119
- &:before {
120
- border-left-color: var(--theme-primary);
121
- border-left-style: solid;
122
- border-left-width: calc(var(--su-static1) * 3); // 3px
123
- content: '';
124
- height: calc(100% + var(--su16));
125
- left: 0;
126
- margin-left: calc(var(--su16) * -1 - var(--su-static1)); // the orange selection indicator overlaps with the widget border
127
- margin-top: calc(var(--su16) / 2 * -1);
128
- position: absolute;
129
- }
130
-
131
- a { // TODO: this isn't the best way to go about this. There should be a "is current" highlight without font modification for more complex cases
132
- &,
133
- &:visited {
134
- color: inherit;
135
- }
136
- }
137
-
138
- color: var(--black);
139
- font-weight: bold;
140
- position: relative;
141
- }
34
+ & &--footer {
35
+ .s-sidebarwidget--action {
36
+ flex: 1;
142
37
  }
143
-
144
- margin: var(--su12) 0;
145
- }
146
-
147
- & &--subnav {
148
- li {
149
- &[aria-current="page"],
150
- &[aria-current="true"] {
151
- a {
152
- &,
153
- &:visited {
154
- color: inherit;
155
- }
156
- }
157
-
158
- #stacks-internals #bullet-arrow(var(--theme-primary));
159
- color: var(--black);
160
- font-weight: bold;
161
- }
162
-
163
- #stacks-internals #bullet-arrow(var(--black-225));
164
- background-position: 0 calc((1.2em - calc(var(--su-static8) + var(--su-static2))) / 2); // 0 ((1.2em - 10) / 2)
165
- background-repeat: no-repeat;
166
- background-size: auto calc(var(--su-static8) + var(--su-static2)); // auto 10px
167
- margin-top: var(--su-static12);
168
- padding-left: var(--su-static16);
169
- }
170
-
171
- list-style-type: none;
172
- margin-left: var(--su8);
173
- padding-left: 0;
38
+
39
+ display: flex;
40
+ font-size: var(--fs-body2);
174
41
  }
175
42
 
176
- & table&--content&__items {
177
- tr.s-sidebarwidget--item {
178
- td {
179
- padding: 0;
180
- }
181
-
182
- display: table-row;
183
- }
184
-
185
- border-collapse: separate;
186
- border-spacing: var(--su16) var(--su12);
187
- padding: var(--su6) 0 0;
43
+ & &--action:is(a, button) {
44
+ white-space: nowrap;
188
45
  }
189
46
 
190
- background-color: var(--white);
191
- border: var(--su-static1) solid var(--_sw-bc);
192
- border-radius: var(--br-md);
193
47
  font-size: var(--fs-body1);
194
- }
195
-
196
- // COLOR ALTERNATIVES
197
- .alternate-color(@name) {
198
- &.s-sidebarwidget__@{name} {
199
- --_sw-bc: var(~"--@{name}-300");
200
-
201
- .highcontrast-mode({
202
- --_sw-bc: var(~"--@{name}-500");
203
- });
204
-
205
- &:after,
206
- .s-sidebarwidget--content + .s-sidebarwidget--content,
207
- .s-sidebarwidget--header {
208
- border-color: var(--_sw-bc);
209
- }
210
-
211
- .s-sidebarwidget--header {
212
- color: var(--fc-medium);
213
- }
214
-
215
- background-color: var(~"--@{name}-100");
216
- border-color: var(--_sw-bc);
217
- }
218
48
  }