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

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 (81) 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 +816 -778
  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 +31 -39
  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.a11y.test.ts +112 -0
  33. package/lib/components/input_textarea/input_textarea.less +1 -1
  34. package/lib/components/input_textarea/input_textarea.visual.test.ts +98 -0
  35. package/lib/components/label/label.less +4 -14
  36. package/lib/components/link/link.less +12 -12
  37. package/lib/components/link-preview/link-preview.a11y.test.ts +48 -0
  38. package/lib/components/link-preview/link-preview.less +16 -7
  39. package/lib/components/link-preview/link-preview.visual.test.ts +52 -0
  40. package/lib/components/modal/modal.less +1 -0
  41. package/lib/components/navigation/navigation.a11y.test.ts +78 -0
  42. package/lib/components/navigation/navigation.visual.test.ts +101 -0
  43. package/lib/components/notice/notice.a11y.test.ts +17 -0
  44. package/lib/components/notice/notice.less +45 -82
  45. package/lib/components/notice/notice.visual.test.ts +26 -0
  46. package/lib/components/page-title/page-title.a11y.test.ts +29 -0
  47. package/lib/components/page-title/page-title.less +1 -1
  48. package/lib/components/page-title/page-title.visual.test.ts +59 -0
  49. package/lib/components/pagination/pagination.a11y.test.ts +20 -0
  50. package/lib/components/pagination/pagination.less +2 -2
  51. package/lib/components/pagination/pagination.visual.test.ts +26 -0
  52. package/lib/components/post-summary/post-summary.less +16 -16
  53. package/lib/components/progress-bar/progress-bar.less +2 -2
  54. package/lib/components/prose/prose.less +2 -2
  55. package/lib/components/select/select.less +1 -1
  56. package/lib/components/sidebar-widget/sidebar-widget.less +3 -3
  57. package/lib/components/spinner/spinner.a11y.test.ts +15 -0
  58. package/lib/components/spinner/spinner.visual.test.ts +43 -0
  59. package/lib/components/tag/tag.a11y.test.ts +29 -0
  60. package/lib/components/tag/tag.less +29 -29
  61. package/lib/components/tag/tag.visual.test.ts +46 -0
  62. package/lib/components/toast/toast.a11y.test.ts +30 -0
  63. package/lib/components/toast/toast.visual.test.ts +10 -6
  64. package/lib/components/toggle-switch/toggle-switch.less +2 -5
  65. package/lib/components/topbar/topbar.less +60 -44
  66. package/lib/components/uploader/uploader.less +19 -13
  67. package/lib/components/user-card/user-card.less +3 -3
  68. package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +17 -10
  69. package/lib/exports/__snapshots__/color.less.test.ts.snap +197 -185
  70. package/lib/exports/color-mixins.less +1 -1
  71. package/lib/exports/color-sets.less +130 -81
  72. package/lib/exports/color.less +14 -6
  73. package/lib/exports/v1/__snapshots__/constants-colors.less.test.ts.snap +3 -3
  74. package/lib/exports/v1/constants-colors.less +2 -2
  75. package/lib/input-utils.less +1 -1
  76. package/lib/test/axe-apca/README.md +19 -0
  77. package/lib/test/axe-apca/src/axe-apca.test.ts +77 -1
  78. package/lib/test/axe-apca/src/axe-apca.ts +16 -8
  79. package/lib/test/test-utils.ts +8 -6
  80. package/package.json +14 -14
  81. package/lib/exports/theme.less +0 -85
@@ -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;
@@ -8,26 +8,26 @@
8
8
  min-width: auto;
9
9
  width: 100%;
10
10
  z-index: var(--zi-navigation-fixed);
11
- background-color: var(--theme-topbar-background-color);
12
- height: var(--theme-topbar-height);
11
+ background-color: var(--theme-topbar-background-color, var(--white));
12
+ height: var(--theme-topbar-height, calc(var(--su-static48) + var(--su-static8)));
13
13
  display: flex;
14
- border-top: var(--theme-topbar-accent-border);
15
- border-bottom: var(--theme-topbar-bottom-border);
14
+ border-top: var(--theme-topbar-accent-border, 3px solid var(--theme-primary));
15
+ border-bottom: var(--theme-topbar-bottom-border, 1px solid var(--black-225));
16
16
  position: relative;
17
17
  align-items: center;
18
18
 
19
19
  // Redefine the variables for extra contrast in high-contrast mode
20
20
  .highcontrast-mode({
21
21
  // Search input
22
- --theme-topbar-search-color: var(--theme-topbar-item-color);
23
- --theme-topbar-search-background: var(--theme-topbar-background-color);
24
- --theme-topbar-search-placeholder: var(--theme-topbar-item-color);
25
- --theme-topbar-search-border: var(--theme-topbar-item-color);
26
- --theme-topbar-search-border-focus: var(--theme-topbar-item-color);
22
+ --theme-topbar-search-color: var(--theme-topbar-item-color, var(--black-400));
23
+ --theme-topbar-search-background: var(--theme-topbar-background-color, var(--white));
24
+ --theme-topbar-search-placeholder: var(--theme-topbar-item-color, var(--black-400));
25
+ --theme-topbar-search-border: var(--theme-topbar-item-color, var(--black-400));
26
+ --theme-topbar-search-border-focus: var(--theme-topbar-item-color, var(--black-400));
27
27
 
28
28
  // Search switcher
29
- --theme-topbar-select-color: var(--theme-topbar-item-color);
30
- --theme-topbar-select-background: var(--theme-topbar-background-color);
29
+ --theme-topbar-select-color: var(--theme-topbar-item-color, var(--black-400));
30
+ --theme-topbar-select-background: var(--theme-topbar-background-color, var(--white));
31
31
 
32
32
  // Topbar items
33
33
  --theme-topbar-item-color: var(--black-600);
@@ -57,11 +57,11 @@
57
57
  }
58
58
 
59
59
  a.s-topbar--logo:hover {
60
- background-color: var(--theme-topbar-item-background-hover);
60
+ background-color: var(--theme-topbar-item-background-hover, var(--black-200));
61
61
  }
62
62
 
63
63
  a.s-topbar--logo.is-selected {
64
- background-color: var(--theme-topbar-item-background-hover);
64
+ background-color: var(--theme-topbar-item-background-hover, var(--black-200));
65
65
  }
66
66
 
67
67
  .s-topbar--menu-btn {
@@ -80,7 +80,7 @@
80
80
  &:after {
81
81
  width: var(--su-static16);
82
82
  height: var(--su-static2);
83
- background-color: var(--theme-topbar-item-color);
83
+ background-color: var(--theme-topbar-item-color, var(--black-400));
84
84
  position: relative;
85
85
  }
86
86
 
@@ -102,7 +102,7 @@
102
102
 
103
103
  // Transforming hamburger into x
104
104
  &.is-selected {
105
- color: var(--theme-topbar-item-color-current);
105
+ color: var(--theme-topbar-item-color-current, var(--black));
106
106
  background-color: var(--theme-topbar-item-background-current);
107
107
 
108
108
  span {
@@ -119,22 +119,38 @@
119
119
  }
120
120
 
121
121
  &:hover {
122
- color: var(--theme-topbar-item-color-hover);
123
- background-color: var(--theme-topbar-item-background-hover);
122
+ color: var(--theme-topbar-item-color-hover, var(--black-600));
123
+ background-color: var(--theme-topbar-item-background-hover, var(--black-200));
124
124
  }
125
125
  }
126
126
 
127
127
  .s-navigation {
128
128
  .s-navigation--item:focus-visible {
129
- box-shadow: var(--theme-topbar-search-shadow-focus);
129
+ box-shadow: var(--theme-topbar-search-shadow-focus, 0 0 0 var(--su-static4) var(--focus-ring));
130
130
  }
131
131
  .s-navigation--item:not(.is-selected) {
132
- color: var(--theme-topbar-item-color);
132
+ color: var(--theme-topbar-item-color, var(--black-400));
133
133
  }
134
134
 
135
135
  .s-navigation--item:not(.is-selected):hover {
136
- color: var(--theme-topbar-item-color-hover);
137
- background-color: var(--theme-topbar-item-background-hover);
136
+ color: var(--theme-topbar-item-color-hover, var(--black-600));
137
+ background-color: var(--theme-topbar-item-background-hover, var(--black-200));
138
+ }
139
+ }
140
+ .s-popover .s-navigation {
141
+ .s-navigation--item {
142
+ &:focus-visible {
143
+ box-shadow: var(0 0 0 var(--su-static4) var(--focus-ring));
144
+ }
145
+
146
+ &:not(.is-selected) {
147
+ &:hover {
148
+ color: var(--black-600);
149
+ background-color: var(--black-200);
150
+ }
151
+
152
+ color: var(--black-500);
153
+ }
138
154
  }
139
155
  }
140
156
  }
@@ -166,7 +182,7 @@
166
182
  --theme-topbar-item-color-hover: .set-black()[600];
167
183
  --theme-topbar-item-background-hover: .set-black()[200];
168
184
  --theme-topbar-item-color-current: var(--_black-static);
169
- --theme-topbar-item-border-current: var(--theme-primary);
185
+ // --theme-topbar-item-border-current: var(--theme-primary); // As of Stacks v2, this is unused
170
186
 
171
187
  // TODO HACK remove everything below once light/dark topbars are inheriting forced themes correctly
172
188
  // redefine the variables for extra contrast in high-contrast mode
@@ -218,7 +234,7 @@
218
234
  --theme-topbar-item-color-hover: var(--_white-static);
219
235
  --theme-topbar-item-background-hover: .set-black()[500];
220
236
  --theme-topbar-item-color-current: var(--_white-static);
221
- --theme-topbar-item-border-current: var(--theme-primary);
237
+ // --theme-topbar-item-border-current: var(--theme-primary); // As of Stacks v2, this is unused
222
238
 
223
239
  // Themed border accent
224
240
  --theme-topbar-accent-border: none;
@@ -267,7 +283,7 @@
267
283
  margin-left: auto; // Push this section as far to the right as possible
268
284
 
269
285
  .s-topbar--item:not(.s-topbar--item__unset) {
270
- color: var(--theme-topbar-item-color);
286
+ color: var(--theme-topbar-item-color, var(--black-400));
271
287
  display: inline-flex;
272
288
  align-items: center;
273
289
  padding: 0 calc(var(--su12) - var(--su2));
@@ -280,14 +296,14 @@
280
296
  &.is-selected,
281
297
  &.is-selected:hover,
282
298
  &.is-selected:focus {
283
- color: var(--theme-topbar-item-color-hover);
284
- background-color: var(--theme-topbar-item-background-hover);
299
+ color: var(--theme-topbar-item-color-hover, var(--black-600));
300
+ background-color: var(--theme-topbar-item-background-hover, var(--black-200));
285
301
  text-decoration: none;
286
302
  outline: none;
287
303
 
288
304
  .s-activity-indicator {
289
305
  top: calc(50% - calc(var(--su16) + var(--su2))); // 50% - 18px
290
- box-shadow: 0 0 0 var(--su-static2) var(--theme-topbar-item-background-hover);
306
+ box-shadow: 0 0 0 var(--su-static2) var(--theme-topbar-item-background-hover, var(--black-200));
291
307
  }
292
308
  }
293
309
 
@@ -300,7 +316,7 @@
300
316
  top: calc(50% - calc(var(--su12) + var(--su2))); // 50% - 14px
301
317
  right: var(--su-static2);
302
318
  transition: top var(--te-smooth) 0.15s;
303
- box-shadow: 0 0 0 var(--su-static2) var(--theme-topbar-background-color);
319
+ box-shadow: 0 0 0 var(--su-static2) var(--theme-topbar-background-color, var(--white));
304
320
  }
305
321
  }
306
322
 
@@ -325,11 +341,11 @@
325
341
  margin-right: var(--su8);
326
342
  flex-shrink: 0;
327
343
 
328
- .topbar-notice-styles(transparent, transparent, var(--theme-topbar-item-color));
344
+ .topbar-notice-styles(transparent, transparent, var(--theme-topbar-item-color, var(--black-400)));
329
345
 
330
346
  &:hover,
331
347
  &:focus {
332
- .topbar-notice-styles(var(--theme-topbar-item-background-hover), var(--theme-topbar-item-background-hover), var(--theme-topbar-item-color-hover));
348
+ .topbar-notice-styles(var(--theme-topbar-item-background-hover, var(--black-200)), var(--theme-topbar-item-background-hover, var(--black-200)), var(--theme-topbar-item-color-hover, var(--black-600)));
333
349
  }
334
350
 
335
351
  &.is-unread {
@@ -358,26 +374,26 @@
358
374
  flex-grow: 1;
359
375
 
360
376
  .s-input {
361
- border-color: var(--theme-topbar-search-border);
362
- background-color: var(--theme-topbar-search-background);
377
+ border-color: var(--theme-topbar-search-border, var(--black-300));
378
+ background-color: var(--theme-topbar-search-background, var(--white));
363
379
  box-shadow: var(--theme-topbar-search-shadow);
364
- color: var(--theme-topbar-search-color);
380
+ color: var(--theme-topbar-search-color, var(--black-500));
365
381
  display: block;
366
382
  line-height: @inputLineHeights;
367
383
 
368
384
  &:focus {
369
- border-color: var(--theme-topbar-search-border-focus);
370
- box-shadow: var(--theme-topbar-search-shadow-focus);
385
+ border-color: var(--theme-topbar-search-border-focus, var(--blue-400));
386
+ box-shadow: var(--theme-topbar-search-shadow-focus, 0 0 0 var(--su-static4) var(--focus-ring));
371
387
  }
372
388
 
373
389
  &::placeholder {
374
- color: var(--theme-topbar-search-placeholder);
390
+ color: var(--theme-topbar-search-placeholder, var(--black-400));
375
391
  font-style: normal;
376
392
  }
377
393
  }
378
394
 
379
395
  .s-input-icon {
380
- color: var(--theme-topbar-search-placeholder);
396
+ color: var(--theme-topbar-search-placeholder, var(--black-400));
381
397
  }
382
398
  }
383
399
 
@@ -386,7 +402,7 @@
386
402
 
387
403
  align-self: stretch;
388
404
  margin-right: calc(var(--su-static1) * -1); //-1px
389
- color: var(--theme-topbar-select-color);
405
+ color: var(--theme-topbar-select-color, var(--black-500));
390
406
 
391
407
  &:before,
392
408
  &:after {
@@ -399,13 +415,13 @@
399
415
  height: 100%;
400
416
  line-height: @inputLineHeights;
401
417
 
402
- border-color: var(--theme-topbar-search-border);
403
- background-color: var(--theme-topbar-select-background);
404
- color: var(--theme-topbar-select-color);
418
+ border-color: var(--theme-topbar-search-border, var(--black-300));
419
+ background-color: var(--theme-topbar-select-background, var(--black-200));
420
+ color: var(--theme-topbar-select-color, var(--black-500));
405
421
 
406
422
  &:focus {
407
- border-color: var(--theme-topbar-search-border-focus);
408
- box-shadow: var(--theme-topbar-search-shadow-focus);
423
+ border-color: var(--theme-topbar-search-border-focus, var(--blue-400));
424
+ box-shadow: var(--theme-topbar-search-shadow-focus, 0 0 0 var(--su-static4) var(--focus-ring));
409
425
  z-index: var(--zi-selected);
410
426
  }
411
427
  }
@@ -423,7 +439,7 @@
423
439
  top: 100%;
424
440
  max-width: 100%;
425
441
  padding: var(--su8) var(--su12);
426
- background: var(--theme-topbar-item-background-hover);
442
+ background: var(--theme-topbar-item-background-hover, var(--black-200));
427
443
 
428
444
  &.s-topbar--searchbar__open {
429
445
  display: flex;
@@ -10,6 +10,15 @@
10
10
  // CONTEXTUAL STYLES
11
11
  .highcontrast-mode({
12
12
  --_up-bg-bc-hc: var(--black-400);
13
+ &.has-error {
14
+ --_up-bg-bc-hc-state: var(--red-500);
15
+ }
16
+ &.has-success {
17
+ --_up-bg-bc-hc-state: var(--green-400);
18
+ }
19
+ &.has-warning {
20
+ --_up-bg-bc-hc-state: var(--yellow-500);
21
+ }
13
22
  });
14
23
 
15
24
  // STATES
@@ -22,30 +31,27 @@
22
31
  }
23
32
 
24
33
  &.has-error {
25
- --_up-bg: var(--red-200);
26
- --_up-bg-focus: var(--red-300);
27
- --_up-bg-bc: var(--red-400);
28
- --_up-bg-bc-hc-state: var(--red-400);
34
+ --_up-bg: var(--red-100);
35
+ --_up-bg-focus: var(--red-200);
36
+ --_up-bg-bc: var(--red-300);
29
37
  --_up-focus-ring-color: var(--focus-ring-error);
30
- --_up-link-fc: var(--red-600);
38
+ --_up-link-fc: var(--red-500);
31
39
  }
32
40
 
33
41
  &.has-success {
34
42
  --_up-bg: var(--green-100);
35
43
  --_up-bg-focus: var(--green-200);
36
- --_up-bg-bc: var(--green-400);
37
- --_up-bg-bc-hc-state: var(--green-400);
44
+ --_up-bg-bc: var(--green-300);
38
45
  --_up-focus-ring-color: var(--focus-ring-success);
39
- --_up-link-fc: var(--green-600);
46
+ --_up-link-fc: var(--green-400);
40
47
  }
41
48
 
42
49
  &.has-warning {
43
- --_up-bg: var(--yellow-200);
44
- --_up-bg-focus: var(--yellow-300);
45
- --_up-bg-bc: var(--yellow-400);
46
- --_up-bg-bc-hc-state: var(--yellow-400);
50
+ --_up-bg: var(--yellow-100);
51
+ --_up-bg-focus: var(--yellow-200);
52
+ --_up-bg-bc: var(--yellow-300);
47
53
  --_up-focus-ring-color: var(--focus-ring-warning);
48
- --_up-link-fc: var(--yellow-600);
54
+ --_up-link-fc: var(--yellow-500);
49
55
  }
50
56
 
51
57
  &.is-active {
@@ -21,7 +21,7 @@
21
21
  }
22
22
 
23
23
  &&__highlighted {
24
- --_uc-bg: var(--theme-secondary-200);
24
+ --_uc-bg: var(--theme-secondary-100);
25
25
  --_uc-bar: var(--br-md);
26
26
  --_uc-time-fc: var(--black-500);
27
27
  --_uc-type-fc: var(--black-500);
@@ -106,8 +106,8 @@
106
106
  }
107
107
 
108
108
  & &--type {
109
- a {
110
- color: inherit;
109
+ a:not(.s-link) {
110
+ color: inherit !important;
111
111
  }
112
112
 
113
113
  color: var(--_uc-type-fc);
@@ -290,23 +290,23 @@ body .themed {
290
290
  --black-200: hsl(210, 8%, 90%);
291
291
  --black-225: hsl(210, 8%, 85%);
292
292
  --black-250: hsl(210, 8%, 80%);
293
- --black-300: hsl(213, 9%, 75%);
294
- --black-350: hsl(212, 8%, 68%);
295
- --black-400: hsl(210, 8%, 45%);
293
+ --black-300: hsl(210, 9%, 75%);
294
+ --black-350: hsl(210, 8%, 68%);
295
+ --black-400: hsl(210, 8%, 42%);
296
296
  --black-500: hsl(210, 8%, 25%);
297
297
  --black-600: hsl(210, 8%, 5%);
298
- --black: hsl(0, 8%, 5%);
298
+ --black: hsl(0, 0%, 0%);
299
299
  --orange-100: hsl(23, 85%, 97%);
300
300
  --orange-200: hsl(27, 85%, 87%);
301
301
  --orange-300: hsl(27, 85%, 72%);
302
- --orange-400: hsl(27, 90%, 55%);
303
- --orange-500: hsl(27, 88%, 43%);
302
+ --orange-400: hsl(27, 80%, 52%);
303
+ --orange-500: hsl(27, 80%, 43%);
304
304
  --orange-600: hsl(27, 80%, 29%);
305
305
  --blue-100: hsl(210, 80%, 96%);
306
306
  --blue-200: hsl(210, 80%, 91%);
307
307
  --blue-300: hsl(210, 78%, 76%);
308
- --blue-400: hsl(210, 70%, 48%);
309
- --blue-500: hsl(210, 75%, 36%);
308
+ --blue-400: hsl(210, 77%, 46%);
309
+ --blue-500: hsl(210, 77%, 36%);
310
310
  --blue-600: hsl(210, 80%, 23%);
311
311
  --green-100: hsl(148, 35%, 95%);
312
312
  --green-200: hsl(148, 35%, 88%);
@@ -314,7 +314,7 @@ body .themed {
314
314
  --green-400: hsl(148, 70%, 31%);
315
315
  --green-500: hsl(148, 75%, 22%);
316
316
  --green-600: hsl(148, 75%, 15%);
317
- --red-100: hsl(0, 78%, 96%);
317
+ --red-100: hsl(0, 72%, 96%);
318
318
  --red-200: hsl(0, 70%, 93%);
319
319
  --red-300: hsl(0, 65%, 76%);
320
320
  --red-400: hsl(0, 60%, 49%);
@@ -326,6 +326,12 @@ body .themed {
326
326
  --yellow-400: hsl(43, 85%, 50%);
327
327
  --yellow-500: hsl(43, 85%, 33%);
328
328
  --yellow-600: hsl(43, 84%, 18%);
329
+ --purple-100: hsl(237, 80%, 96%);
330
+ --purple-200: hsl(237, 77%, 92%);
331
+ --purple-300: hsl(237, 60%, 83%);
332
+ --purple-400: hsl(237, 55%, 57%);
333
+ --purple-500: hsl(237, 50%, 45%);
334
+ --purple-600: hsl(237, 50%, 32%);
329
335
  --gold-100: hsl(46, 100%, 91%);
330
336
  --gold-200: hsl(46, 100%, 74%);
331
337
  --gold-300: hsl(45, 100%, 42%);
@@ -355,7 +361,7 @@ body .themed {
355
361
  --focus-ring-muted: hsla(210, 8%, 15%, 0.1);
356
362
  --highlight-addition: var(--green-500);
357
363
  --highlight-attribute: hsl(206, 98.5%, 29%);
358
- --highlight-bg: var(--black-100);
364
+ --highlight-bg: hsl(0, 0%, 96.5%);
359
365
  --highlight-color: var(--black-600);
360
366
  --highlight-comment: hsl(210, 8%, 43.5%);
361
367
  --highlight-deletion: var(--red-500);
@@ -395,6 +401,7 @@ body .themed {
395
401
  --theme-secondary-custom-600: hsl(var(--theme-base-secondary-color-h), calc(var(--theme-base-secondary-color-s) + 0 * 1%), clamp(5%, calc(var(--theme-base-secondary-color-l) + -26 * 1%), 40%));
396
402
  --theme-secondary-custom: var(--theme-secondary-custom-400);
397
403
  --theme-secondary-custom-focus-ring: hsla(var(--theme-base-secondary-color-h), var(--theme-base-secondary-color-s), var(--theme-base-secondary-color-l), 0.15);
404
+ color: var(--theme-body-font-color, var(--black-600));
398
405
  }
399
406
  "
400
407
  `;