@stackoverflow/stacks 2.0.0-rc.1 → 2.0.0-rc.10

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 (78) hide show
  1. package/README.md +5 -0
  2. package/dist/components/code-block/code-block.fixtures.d.ts +2 -0
  3. package/dist/css/stacks.css +792 -765
  4. package/dist/css/stacks.min.css +1 -1
  5. package/dist/js/stacks.js +265 -110
  6. package/dist/js/stacks.min.js +1 -1
  7. package/lib/atomic/__snapshots__/color.less.test.ts.snap +246 -0
  8. package/lib/atomic/typography.less +4 -0
  9. package/lib/base/body.less +2 -2
  10. package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +1 -1
  11. package/lib/components/activity-indicator/activity-indicator.less +17 -4
  12. package/lib/components/anchor/anchor.less +10 -6
  13. package/lib/components/anchor/anchor.visual.test.ts +0 -4
  14. package/lib/components/avatar/avatar.visual.test.ts +0 -3
  15. package/lib/components/badge/badge.a11y.test.ts +2 -2
  16. package/lib/components/badge/badge.less +21 -29
  17. package/lib/components/banner/banner.less +2 -2
  18. package/lib/components/block-link/block-link.less +5 -4
  19. package/lib/components/button/button.a11y.test.ts +1 -4
  20. package/lib/components/button/button.less +48 -78
  21. package/lib/components/button/button.visual.test.ts +1 -4
  22. package/lib/components/card/card.less +8 -0
  23. package/lib/components/code-block/code-block.a11y.test.ts +30 -0
  24. package/lib/components/code-block/code-block.fixtures.ts +88 -0
  25. package/lib/components/code-block/code-block.visual.test.ts +20 -0
  26. package/lib/components/description/description.a11y.test.ts +1 -0
  27. package/lib/components/description/description.less +1 -1
  28. package/lib/components/expandable/expandable.a11y.test.ts +27 -0
  29. package/lib/components/expandable/expandable.visual.test.ts +27 -0
  30. package/lib/components/input-icon/input-icon.less +1 -1
  31. package/lib/components/input-message/input-message.less +4 -3
  32. package/lib/components/input_textarea/input_textarea.less +1 -1
  33. package/lib/components/label/label.less +4 -14
  34. package/lib/components/link/link.less +12 -12
  35. package/lib/components/link-preview/link-preview.a11y.test.ts +48 -0
  36. package/lib/components/link-preview/link-preview.less +16 -7
  37. package/lib/components/link-preview/link-preview.visual.test.ts +52 -0
  38. package/lib/components/navigation/navigation.a11y.test.ts +80 -0
  39. package/lib/components/navigation/navigation.visual.test.ts +101 -0
  40. package/lib/components/notice/notice.a11y.test.ts +17 -0
  41. package/lib/components/notice/notice.less +45 -82
  42. package/lib/components/notice/notice.visual.test.ts +26 -0
  43. package/lib/components/page-title/page-title.a11y.test.ts +29 -0
  44. package/lib/components/page-title/page-title.less +1 -1
  45. package/lib/components/page-title/page-title.visual.test.ts +59 -0
  46. package/lib/components/pagination/pagination.a11y.test.ts +20 -0
  47. package/lib/components/pagination/pagination.less +2 -2
  48. package/lib/components/pagination/pagination.visual.test.ts +26 -0
  49. package/lib/components/post-summary/post-summary.less +15 -15
  50. package/lib/components/progress-bar/progress-bar.less +2 -2
  51. package/lib/components/prose/prose.less +2 -2
  52. package/lib/components/select/select.less +1 -1
  53. package/lib/components/sidebar-widget/sidebar-widget.less +3 -3
  54. package/lib/components/spinner/spinner.a11y.test.ts +15 -0
  55. package/lib/components/spinner/spinner.visual.test.ts +43 -0
  56. package/lib/components/tag/tag.a11y.test.ts +23 -0
  57. package/lib/components/tag/tag.less +29 -29
  58. package/lib/components/tag/tag.visual.test.ts +46 -0
  59. package/lib/components/toast/toast.a11y.test.ts +30 -0
  60. package/lib/components/toast/toast.visual.test.ts +10 -6
  61. package/lib/components/toggle-switch/toggle-switch.less +2 -5
  62. package/lib/components/topbar/topbar.less +44 -44
  63. package/lib/components/uploader/uploader.less +19 -13
  64. package/lib/components/user-card/user-card.less +1 -1
  65. package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +17 -10
  66. package/lib/exports/__snapshots__/color.less.test.ts.snap +197 -185
  67. package/lib/exports/color-mixins.less +1 -1
  68. package/lib/exports/color-sets.less +130 -81
  69. package/lib/exports/color.less +14 -6
  70. package/lib/exports/v1/__snapshots__/constants-colors.less.test.ts.snap +3 -3
  71. package/lib/exports/v1/constants-colors.less +2 -2
  72. package/lib/input-utils.less +1 -1
  73. package/lib/test/axe-apca/README.md +19 -0
  74. package/lib/test/axe-apca/src/axe-apca.test.ts +77 -1
  75. package/lib/test/axe-apca/src/axe-apca.ts +16 -8
  76. package/lib/test/test-utils.ts +7 -3
  77. package/package.json +14 -14
  78. package/lib/exports/theme.less +0 -85
@@ -1,10 +1,10 @@
1
1
  .s-pagination {
2
2
  & &--item {
3
3
  --_pa-item-bg: transparent;
4
- --_pa-item-bc: var(--bc-medium);
4
+ --_pa-item-bc: var(--bc-darker);
5
5
  --_pa-item-fc: var(--fc-medium);
6
6
  --_pa-item-bg-hover: var(--black-225);
7
- --_pa-item-bc-hover: var(--bc-dark);
7
+ --_pa-item-bc-hover: var(--bc-darker);
8
8
  --_pa-item-fc-hover: var(--fc-dark);
9
9
 
10
10
  // CONTEXTUAL STYLES
@@ -0,0 +1,26 @@
1
+ import { html } from "@open-wc/testing";
2
+ import { runComponentTests } from "../../test/test-utils";
3
+ import "../../index";
4
+
5
+ describe("pagination", () => {
6
+ runComponentTests({
7
+ type: "visual",
8
+ baseClass: "s-pagination",
9
+ children: {
10
+ default: `
11
+ <a class="s-pagination--item" href="#">Prev</a>
12
+ <a class="s-pagination--item" href="#">1</a>
13
+ <span class="s-pagination--item is-selected" aria-current="page">2</span>
14
+ <a class="s-pagination--item" href="#">3</a>
15
+ <span class="s-pagination--item s-pagination--item__clear">…</span>
16
+ <a class="s-pagination--item" href="#">100</a>
17
+ <a class="s-pagination--item" href="#">Next</a>
18
+ `,
19
+ },
20
+ template: ({ component, testid }) => html`
21
+ <div class="d-inline-block p8" data-testid="${testid}">
22
+ ${component}
23
+ </div>
24
+ `,
25
+ });
26
+ });
@@ -5,19 +5,19 @@
5
5
  --_ps-o: unset;
6
6
  // Child components
7
7
  --_ps-content-excerpt-fc: var(--_ps-state-fc, var(--fc-medium));
8
- --_ps-content-title-a-fc: var(--_ps-state-fc, var(--theme-post-title-color));
9
- --_ps-content-title-a-fc-hover: var(--_ps-state-fc, var(--theme-post-title-color-hover));
10
- --_ps-content-title-a-fc-visited: var(--_ps-state-fc, var(--theme-post-title-color-visited));
8
+ --_ps-content-title-a-fc: var(--_ps-state-fc, var(--theme-post-title-color, var(--theme-link-color, var(--theme-secondary-400))));
9
+ --_ps-content-title-a-fc-hover: var(--_ps-state-fc, var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--theme-secondary-500))));
10
+ --_ps-content-title-a-fc-visited: var(--_ps-state-fc, var(--theme-post-title-color-visited, var(--theme-link-color-visited, var(--theme-secondary-600))));
11
11
  --_ps-stats-ai: flex-end;
12
12
  --_ps-stats-fc: var(--_ps-state-fc, var(--fc-light));
13
13
  --_ps-stats-fd: column;
14
14
  --_ps-stats-w: calc(var(--su96) + var(--su12));
15
15
  // Stats item modifiers
16
- --_ps-has-answers-bc: var(--green-500);
16
+ --_ps-has-answers-bc: var(--green-400);
17
17
  --_ps-has-answers-bg: unset;
18
- --_ps-has-answers-fc: var(--green-500);
19
- --_ps-has-accepted-answers-bc: var(--green-500);
20
- --_ps-has-accepted-answers-bg: var(--green-500);
18
+ --_ps-has-answers-fc: var(--green-400);
19
+ --_ps-has-accepted-answers-bc: var(--green-400);
20
+ --_ps-has-accepted-answers-bg: var(--green-400);
21
21
  --_ps-has-accepted-answers-fc: var(--white);
22
22
  --_ps-stats-item-emphasized-fc: var(--_ps-state-fc, var(--fc-dark));
23
23
 
@@ -117,9 +117,9 @@
117
117
  &:not(.s-post-summary__deleted):not(.s-post-summary__ignored) {
118
118
  --_ps-bg: var(--yellow-200);
119
119
  --_ps-stats-fc: var(--black-400);
120
- --_ps-content-title-a-fc: var(--theme-post-title-color);
121
- --_ps-content-title-a-fc-hover: var(--theme-post-title-color-hover);
122
- --_ps-content-title-a-fc-visited: var(--theme-post-title-color-visited);
120
+ --_ps-content-title-a-fc: var(--theme-post-title-color, var(--theme-link-color, var(--theme-secondary-400)));
121
+ --_ps-content-title-a-fc-hover: var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--theme-secondary-500)));
122
+ --_ps-content-title-a-fc-visited: var(--theme-post-title-color-visited, var(--theme-link-color-visited, var(--theme-secondary-600)));
123
123
 
124
124
  .s-user-card {
125
125
  a {
@@ -208,7 +208,7 @@
208
208
  .break-word;
209
209
  .v-truncate2;
210
210
  color: var( --_ps-content-excerpt-fc);
211
- font-family: var(--theme-post-body-font-family);
211
+ font-family: var(--theme-post-body-font-family, var(--theme-body-font-family));
212
212
  margin-top: calc(var(--su2) * -1);
213
213
  margin-bottom: var(--su8);
214
214
  }
@@ -240,7 +240,7 @@
240
240
 
241
241
  .break-word;
242
242
  color: var(--_ps-content-title-a-fc);
243
- font-family: var(--theme-post-title-font-family);
243
+ font-family: var(--theme-post-title-font-family, var(--theme-body-font-family));
244
244
  }
245
245
 
246
246
  .iconShield {
@@ -380,15 +380,15 @@
380
380
 
381
381
  // Hotness
382
382
  &.is-warm {
383
- color: var(--_ps-state-fc, var(--yellow-600));
383
+ color: var(--_ps-state-fc, var(--yellow-500));
384
384
  }
385
385
 
386
386
  &.is-hot {
387
- color: var(--_ps-state-fc, var(--orange-600));
387
+ color: var(--_ps-state-fc, var(--orange-500));
388
388
  }
389
389
 
390
390
  &.is-supernova {
391
- color: var(--_ps-state-fc, var(--red-600));
391
+ color: var(--_ps-state-fc, var(--red-500));
392
392
  }
393
393
 
394
394
  // Status
@@ -135,7 +135,7 @@
135
135
  }
136
136
  }
137
137
 
138
- background: var(--black-350);
138
+ background: var(--black-250);
139
139
  border-radius: 0;
140
140
  height: var(--su-static6);
141
141
  position: absolute;
@@ -203,7 +203,7 @@
203
203
  });
204
204
 
205
205
  align-items: center;
206
- background: var(--black-350);
206
+ background: var(--black-250);
207
207
  border-radius: 100%;
208
208
  color: var(--_white-static);
209
209
  display: flex;
@@ -18,7 +18,7 @@
18
18
  --_pr-h6-fs: var(--fs-body1);
19
19
  --_pr-hr-bg: var(--black-225); // used for both background-color and color properties
20
20
  --_pr-img-mb: @pr-spacing;
21
- --_pr-kbd-bc: var(--black-350);
21
+ --_pr-kbd-bc: var(--black-300);
22
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);
23
23
  --_pr-spoiler-cursor: pointer;
24
24
  --_pr-spoiler-after-t: 1em;
@@ -74,7 +74,7 @@
74
74
  // CHILD ELEMENTS
75
75
  *:not(.s-code-block) {
76
76
  > a code {
77
- color: var(--theme-link-color); // When contained within a link, we want the code to be link-colored
77
+ color: var(--theme-link-color, var(--theme-secondary-400)); // When contained within a link, we want the code to be link-colored
78
78
  }
79
79
 
80
80
  > code {
@@ -1,7 +1,7 @@
1
1
  .s-select {
2
2
  --_se-arrow-bc: currentColor transparent;
3
3
  --_se-arrow-size: var(--su-static4); // Constant
4
- --_se-select-bc: var(--bc-dark);
4
+ --_se-select-bc: var(--bc-darker);
5
5
  --_se-select-bc-focus: var(--theme-secondary-400);
6
6
  --_se-select-bs-focus: 0 0 0 var(--su-static4) var(--focus-ring);
7
7
  --_se-select-bg: var(--white);
@@ -69,7 +69,7 @@
69
69
  &__expanding-control {
70
70
  &:before {
71
71
  border: calc(var(--su-static4) + var(--su-static1)) solid transparent;
72
- border-left-color: var(--bc-dark);
72
+ border-left-color: var(--black-400);
73
73
  border-right-width: 0;
74
74
  content: '';
75
75
  float: left;
@@ -228,11 +228,11 @@
228
228
  }
229
229
 
230
230
  .s-sidebarwidget--header {
231
- background-color: var(~"--@{name}-300");
231
+ background-color: var(~"--@{name}-200");
232
232
  color: var(--fc-medium);
233
233
  }
234
234
 
235
- background-color: var(~"--@{name}-200");
235
+ background-color: var(~"--@{name}-100");
236
236
  border-color: var(--_sw-bc);
237
237
  }
238
238
  }
@@ -0,0 +1,15 @@
1
+ import { runComponentTests } from "../../test/test-utils";
2
+ import "../../index";
3
+
4
+ describe("spinner", () => {
5
+ runComponentTests({
6
+ type: "a11y",
7
+ baseClass: "s-spinner",
8
+ modifiers: {
9
+ primary: ["xs", "sm", "md", "lg"],
10
+ },
11
+ children: {
12
+ default: `<div class="v-visible-sr">Loading…</div>`,
13
+ },
14
+ });
15
+ });
@@ -0,0 +1,43 @@
1
+ import { html } from "@open-wc/testing";
2
+ import { runComponentTests } from "../../test/test-utils";
3
+ import "../../index";
4
+
5
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
+ const template = ({ component, testid }: any) => html`
7
+ <div class="d-inline-block p8" data-testid="${testid}">${component}</div>
8
+ `;
9
+ describe("spinner", () => {
10
+ // default, sizes
11
+ runComponentTests({
12
+ type: "visual",
13
+ baseClass: "s-spinner",
14
+ modifiers: {
15
+ primary: ["xs", "sm", "md", "lg"],
16
+ },
17
+ children: {
18
+ default: `<div class="v-visible-sr">Loading…</div>`,
19
+ },
20
+ template,
21
+ });
22
+ // applied font color
23
+ runComponentTests({
24
+ type: "visual",
25
+ baseClass: "s-spinner",
26
+ modifiers: {
27
+ global: ["fc-theme-primary"],
28
+ },
29
+ children: {
30
+ default: `<div class="v-visible-sr">Loading…</div>`,
31
+ },
32
+ template,
33
+ });
34
+ // .is-loading
35
+ runComponentTests({
36
+ type: "visual",
37
+ baseClass: "is-loading",
38
+ children: {
39
+ default: `Loading…`,
40
+ },
41
+ template,
42
+ });
43
+ });
@@ -0,0 +1,23 @@
1
+ import { IconClearSm } from "@stackoverflow/stacks-icons";
2
+ import { runComponentTests } from "../../test/test-utils";
3
+ import "../../index";
4
+
5
+ const children = {
6
+ default: `default`,
7
+ dismiss: `dismiss <span class="s-tag--dismiss">${IconClearSm}</span>`,
8
+ sponsor: `<img class="s-tag--sponsor" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII" width="16" height="16" alt="sponsor">sponsor`,
9
+ };
10
+
11
+ describe("tag", () => {
12
+ runComponentTests({
13
+ type: "a11y",
14
+ baseClass: "s-tag",
15
+ variants: ["ignored", "watched", "moderator", "muted", "required"],
16
+ modifiers: {
17
+ global: ["is-selected"],
18
+ },
19
+ children,
20
+ // TODO: revisit this after minor tag changes are made
21
+ skippedTestids: [/s-tag/],
22
+ });
23
+ });
@@ -1,13 +1,13 @@
1
1
  .s-tag {
2
- --_ta-bc: var(--theme-tag-border-color);
3
- --_ta-bc-hover: var(--theme-tag-hover-border-color);
2
+ --_ta-bc: var(--theme-tag-border-color, transparent);
3
+ --_ta-bc-hover: var(--theme-tag-hover-border-color, transparent);
4
4
  --_ta-bc-selected: transparent;
5
- --_ta-bg: var(--theme-tag-background-color);
6
- --_ta-bg-hover: var(--theme-tag-hover-background-color);
5
+ --_ta-bg: var(--theme-tag-background-color, var(--theme-secondary-100));
6
+ --_ta-bg-hover: var(--theme-tag-hover-background-color, var(--theme-secondary-200));
7
7
  --_ta-bg-selected: var(--theme-secondary-300);
8
8
  --_ta-br: var(--br-sm);
9
- --_ta-fc: var(--theme-tag-color);
10
- --_ta-fc-hover: var(--theme-tag-hover-color);
9
+ --_ta-fc: var(--theme-tag-color, var(--theme-secondary-500));
10
+ --_ta-fc-hover: var(--theme-tag-hover-color, var(--theme-secondary-600));
11
11
  --_ta-fc-selected: var(--theme-secondary-600);
12
12
  --_ta-fs: var(--fs-caption);
13
13
  --_ta-lh: 1.846153846;
@@ -99,41 +99,41 @@
99
99
 
100
100
  // moderator overrides other muted and required, required overrides muted
101
101
  &&__moderator {
102
- --_ta-bc: var(--red-300);
103
- --_ta-bg: var(--red-200);
104
- --_ta-fc: var(--red-600);
105
- --_ta-bc-hover: var(--red-400);
106
- --_ta-bg-hover: var(--red-300);
107
- --_ta-fc-hover: var(--red-600);
108
- --_ta-bc-selected: var(--red-400);
109
- --_ta-bg-selected: var(--red-300);
110
- --_ta-fc-selected: var(--red-600);
102
+ --_ta-bc: transparent;
103
+ --_ta-bg: var(--orange-100);
104
+ --_ta-fc: var(--orange-500);
105
+ --_ta-bc-hover: transparent;
106
+ --_ta-bg-hover: var(--orange-200);
107
+ --_ta-fc-hover: var(--orange-600);
108
+ --_ta-bc-selected: transparent;
109
+ --_ta-bg-selected: var(--orange-300);
110
+ --_ta-fc-selected: var(--orange-600); // Currently APCA Lc 49 😔
111
111
  }
112
112
 
113
113
  &&__muted:not(&__moderator):not(&__required) {
114
114
  --_ta-bc: transparent;
115
- --_ta-bg: var(--black-200);
116
- --_ta-fc: var(--black-500);
115
+ --_ta-bg: var(--black-150);
116
+ --_ta-fc: var(--black-400);
117
117
  --_ta-bc-hover: transparent;
118
- --_ta-bg-hover: var(--black-225);
119
- --_ta-fc-hover: var(--black-600);
118
+ --_ta-bg-hover: var(--black-200);
119
+ --_ta-fc-hover: var(--black-500);
120
120
  --_ta-bc-selected: transparent;
121
- --_ta-bg-selected: var(--black-300);
121
+ --_ta-bg-selected: var(--black-225);
122
122
  --_ta-fc-selected: var(--black-600);
123
123
 
124
124
  .highcontrast-mode({ --_ta-bc: currentColor; }); // Specificity has bit us, so we need this override
125
125
  }
126
126
 
127
127
  &&__required:not(&__moderator) {
128
- --_ta-bc: var(--bc-dark);
129
- --_ta-bg: var(--black-200);
130
- --_ta-fc: var(--black-500);
131
- --_ta-bc-hover: var(--black-350);
132
- --_ta-bg-hover: var(--black-225);
133
- --_ta-fc-hover: var(--black-600);
134
- --_ta-bc-selected: var(--black-400);
135
- --_ta-bg-selected: var(--black-300);
136
- --_ta-fc-selected: var(--black-600);
128
+ --_ta-bc: transparent;
129
+ --_ta-bg: var(--theme-secondary-500);
130
+ --_ta-fc: var(--white);
131
+ --_ta-bc-hover: transparent;
132
+ --_ta-bg-hover: var(--theme-secondary-400);
133
+ --_ta-fc-hover: var(--white);
134
+ --_ta-bc-selected: transparent;
135
+ --_ta-bg-selected: var(--theme-secondary-600);
136
+ --_ta-fc-selected: var(--white);
137
137
  }
138
138
  &__watched, // TODO: remove all single `&` watched styles once core no longer requires them
139
139
  &&__watched {
@@ -0,0 +1,46 @@
1
+ import { html } from "@open-wc/testing";
2
+ import { IconClearSm } from "@stackoverflow/stacks-icons";
3
+ import { defaultOptions, runComponentTests } from "../../test/test-utils";
4
+ import "../../index";
5
+
6
+ const children = {
7
+ default: `default`,
8
+ dismiss: `dismiss <span class="s-tag--dismiss">${IconClearSm}</span>`,
9
+ sponsor: `<img class="s-tag--sponsor" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII" width="16" height="16" alt="sponsor">sponsor`,
10
+ };
11
+
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
+ const template = ({ component, testid }: any) => html`
14
+ <div data-testid="${testid}" class="d-inline-block p4">${component}</div>
15
+ `;
16
+
17
+ describe("tag", () => {
18
+ runComponentTests({
19
+ type: "visual",
20
+ baseClass: "s-tag",
21
+ variants: ["ignored", "watched", "moderator", "muted", "required"],
22
+ modifiers: {
23
+ global: ["is-selected"],
24
+ },
25
+ children,
26
+ template,
27
+ });
28
+
29
+ // Size modifiers
30
+ runComponentTests({
31
+ type: "visual",
32
+ baseClass: "s-tag",
33
+ modifiers: {
34
+ primary: ["xs", "sm", "md", "lg"],
35
+ global: ["is-selected"],
36
+ },
37
+ children: {
38
+ default: `default`,
39
+ },
40
+ template,
41
+ options: {
42
+ ...defaultOptions,
43
+ includeNullModifier: false,
44
+ },
45
+ });
46
+ });
@@ -0,0 +1,30 @@
1
+ import { runComponentTests } from "../../test/test-utils";
2
+ import { html } from "@open-wc/testing";
3
+ import "../../index";
4
+
5
+ describe("toast > notice", () => {
6
+ // This is a test of notice component wrapped in a toast component
7
+ runComponentTests({
8
+ type: "a11y",
9
+ baseClass: "s-notice", // s-toast is a wrapper around s-notice
10
+ variants: ["info", "success", "warning", "danger"],
11
+ modifiers: {
12
+ primary: ["important"],
13
+ },
14
+ children: {
15
+ toast: `<span id="message">Test toast</span>`,
16
+ },
17
+ tag: "aside",
18
+ template: ({ component, testid }) => html`
19
+ <div
20
+ class="s-toast ps-static t0 l0"
21
+ role="alertdialog"
22
+ aria-hidden="false"
23
+ aria-labelledby="message"
24
+ data-testid="${testid}"
25
+ >
26
+ ${component}
27
+ </div>
28
+ `,
29
+ });
30
+ });
@@ -11,16 +11,20 @@ describe("toast > notice", () => {
11
11
  modifiers: {
12
12
  primary: ["important"],
13
13
  },
14
- attributes: {
15
- ariaHidden: "false",
16
- },
17
14
  children: {
18
- toast: "Test toast",
15
+ toast: `<span id="message">Test toast</span>`,
19
16
  },
20
17
  tag: "aside",
21
18
  template: ({ component, testid }) => html`
22
- <div data-testid="${testid}" class="s-toast" aria-hidden="false">
23
- ${component}
19
+ <div class="d-inline-block p8" data-testid="${testid}">
20
+ <div
21
+ class="s-toast ps-static t0 l0"
22
+ role="alertdialog"
23
+ aria-hidden="false"
24
+ aria-labelledby="message"
25
+ >
26
+ ${component}
27
+ </div>
24
28
  </div>
25
29
  `,
26
30
  });
@@ -21,15 +21,11 @@
21
21
  &.s-toggle-switch--label-off {
22
22
  --_ts-multiple-bg: var(--black-400);
23
23
  --_ts-multiple-fc: var(--white);
24
-
25
- .dark-mode({ --_ts-multiple-bg: var(--black-350); });
26
24
  }
27
25
 
28
26
  &:not(.s-toggle-switch--label-off) {
29
27
  --_ts-multiple-bg: var(--green-400);
30
- --_ts-multiple-fc: var(--_white-static);
31
-
32
- .highcontrast-mode({ --_ts-multiple-fc: var(--white); });
28
+ --_ts-multiple-fc: var(--white);
33
29
  }
34
30
  }
35
31
 
@@ -102,6 +98,7 @@
102
98
  background-repeat: no-repeat;
103
99
  border-radius: 1000px;
104
100
  cursor: pointer;
101
+ flex-shrink: 0;
105
102
  height: var(--su-static24);
106
103
  margin: 0; // guard against production adding 5px of margin to these
107
104
  transition: background-position 0.2s ease;