@stackoverflow/stacks 0.69.1 → 0.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +1 -1
  2. package/dist/css/stacks.css +2166 -941
  3. package/dist/css/stacks.min.css +1 -1
  4. package/dist/js/stacks.js +167 -92
  5. package/dist/js/stacks.min.js +1 -1
  6. package/lib/css/atomic/_stacks-borders.less +18 -0
  7. package/lib/css/atomic/_stacks-flex.less +2 -7
  8. package/lib/css/atomic/_stacks-grid.less +2 -0
  9. package/lib/css/atomic/_stacks-misc.less +8 -4
  10. package/lib/css/atomic/_stacks-typography.less +23 -8
  11. package/lib/css/base/_stacks-configuration-dynamic.less +13 -56
  12. package/lib/css/components/_stacks-activity-indicator.less +26 -2
  13. package/lib/css/components/_stacks-avatars.less +9 -0
  14. package/lib/css/components/_stacks-badges.less +21 -9
  15. package/lib/css/components/_stacks-breadcrumbs.less +2 -0
  16. package/lib/css/components/_stacks-button-groups.less +11 -0
  17. package/lib/css/components/_stacks-buttons.less +143 -42
  18. package/lib/css/components/_stacks-cards.less +9 -13
  19. package/lib/css/components/_stacks-code-blocks.less +1 -1
  20. package/lib/css/components/_stacks-inputs.less +78 -9
  21. package/lib/css/components/_stacks-link-previews.less +10 -7
  22. package/lib/css/components/_stacks-links.less +29 -9
  23. package/lib/css/components/_stacks-menu.less +4 -4
  24. package/lib/css/components/_stacks-modals.less +1 -1
  25. package/lib/css/components/_stacks-navigation.less +43 -0
  26. package/lib/css/components/_stacks-notices.less +40 -3
  27. package/lib/css/components/_stacks-page-titles.less +1 -1
  28. package/lib/css/components/_stacks-pagination.less +4 -2
  29. package/lib/css/components/_stacks-popovers.less +26 -6
  30. package/lib/css/components/_stacks-post-summary.less +121 -3
  31. package/lib/css/components/_stacks-progress-bars.less +29 -6
  32. package/lib/css/components/_stacks-prose.less +18 -4
  33. package/lib/css/components/_stacks-tables.less +10 -6
  34. package/lib/css/components/_stacks-tags.less +22 -19
  35. package/lib/css/components/_stacks-toggle-switches.less +12 -0
  36. package/lib/css/components/_stacks-topbar.less +440 -0
  37. package/lib/css/components/_stacks-uploader.less +22 -0
  38. package/lib/css/components/_stacks-widget-static.less +15 -3
  39. package/lib/css/exports/_stacks-constants-colors.less +700 -220
  40. package/lib/css/exports/_stacks-constants-helpers.less +1 -2
  41. package/lib/css/exports/_stacks-mixins.less +26 -0
  42. package/lib/css/stacks-dynamic.less +0 -1
  43. package/lib/css/stacks-static.less +15 -0
  44. package/lib/ts/controllers/s-tooltip.ts +4 -0
  45. package/package.json +15 -12
@@ -46,6 +46,11 @@
46
46
  background-color: var(--black-100);
47
47
  height: 1px;
48
48
  margin-bottom: var(--s-prose-spacing);
49
+
50
+ .highcontrast-mode({
51
+ color: var(--black-500);
52
+ background-color: var(--black-500);
53
+ });
49
54
  }
50
55
 
51
56
  li {
@@ -317,9 +322,13 @@
317
322
  top: 0;
318
323
  bottom: 0;
319
324
  left: 0;
320
- width: 4px;
321
- border-radius: 8px;
325
+ width: @su4;
326
+ border-radius: @su8;
322
327
  background: var(--black-150);
328
+
329
+ .highcontrast-mode({
330
+ background: var(--black-600);
331
+ });
323
332
  }
324
333
 
325
334
  blockquote {
@@ -402,11 +411,11 @@
402
411
  background-color: var(--black-075);
403
412
  border: 1px solid var(--black-300);
404
413
  border-radius: @br-sm;
405
- box-shadow: 0 1px 1px rgba(12, 13, 14, 0.15), inset 0 1px 0 0 @white;
414
+ box-shadow: 0 1px 1px hsla(210, 8%, 5%, 0.15), inset 0 1px 0 0 @white;
406
415
  overflow-wrap: break-word;
407
416
 
408
417
  .dark-mode({
409
- box-shadow: 0 1px 1px rgba(12, 13, 14, 0.8);
418
+ box-shadow: 0 1px 1px hsla(210, 8%, 5%, 0.8);
410
419
  border-color: transparent;
411
420
  border-top-color: @black-500;
412
421
  });
@@ -422,6 +431,11 @@
422
431
  border-radius: @br-sm;
423
432
  }
424
433
 
434
+ // When contained within a link, we want the code to be link-colored
435
+ *:not(.s-code-block) > a code {
436
+ color: var(--theme-link-color);
437
+ }
438
+
425
439
  pre {
426
440
  margin-top: 0;
427
441
  margin-bottom: calc(var(--s-prose-spacing) + 0.4em); // Increase this spacing for better optical alignment
@@ -45,9 +45,9 @@
45
45
  th,
46
46
  td {
47
47
  padding: @su8;
48
- border-top: 1px solid var(--black-100);
49
- border-left: 1px solid var(--black-100);
50
- border-right: 1px solid var(--black-100);
48
+ border-top: 1px solid var(--bc-medium);
49
+ border-left: 1px solid var(--bc-medium);
50
+ border-right: 1px solid var(--bc-medium);
51
51
  vertical-align: middle;
52
52
  color: var(--fc-medium);
53
53
  text-align: left;
@@ -82,12 +82,12 @@
82
82
  // If it's the last row, add a bottom border
83
83
  tr:last-of-type td,
84
84
  tr:last-of-type th {
85
- border-bottom: 1px solid var(--black-100);
85
+ border-bottom: 1px solid var(--bc-medium);
86
86
  }
87
87
 
88
88
  // If two table bodies are next to each other, visually separate them
89
89
  tbody + tbody {
90
- border-top: @su2 solid var(--black-100);
90
+ border-top: @su2 solid var(--bc-medium);
91
91
  }
92
92
  }
93
93
 
@@ -240,7 +240,7 @@
240
240
  }
241
241
  thead th {
242
242
  border-top-color: transparent;
243
- border-bottom-color: var(--black-200);
243
+ border-bottom-color: var(--bc-darker);
244
244
  // Clear Header Styles
245
245
  background-color: transparent;
246
246
  text-transform: initial;
@@ -312,6 +312,10 @@
312
312
  th:not(.is-enabled),
313
313
  td:not(.is-enabled) {
314
314
  opacity: 0.3;
315
+
316
+ .highcontrast-mode({
317
+ opacity: 0.8;
318
+ });
315
319
  }
316
320
  }
317
321
  }
@@ -17,13 +17,21 @@
17
17
  background-color: @background;
18
18
  color: @color;
19
19
 
20
+ .highcontrast-mode({
21
+ border-color: currentColor;
22
+ });
23
+
20
24
  .s-tag--dismiss {
21
25
  color: inherit;
22
26
  background-color: transparent;
23
27
 
24
28
  &:hover {
25
- color: @white; // We want this color to remain fixed regardless of dark mode
29
+ color: @background;
26
30
  background-color: @color;
31
+
32
+ .highcontrast-mode({
33
+ color: var(--white); // We do not want this color to remain fixed
34
+ });
27
35
  }
28
36
  }
29
37
  }
@@ -32,6 +40,10 @@
32
40
  border-color: @border;
33
41
  background-color: @background;
34
42
  color: @color;
43
+
44
+ .highcontrast-mode({
45
+ border-color: currentColor;
46
+ });
35
47
  }
36
48
 
37
49
  .s-tag-hover-styles(@border-hover: transparent, @background-hover: transparent, @color-hover: inherit) {
@@ -41,6 +53,10 @@
41
53
  border-color: @border-hover;
42
54
  background-color: @background-hover;
43
55
  color: @color-hover;
56
+
57
+ .highcontrast-mode({
58
+ border-color: currentColor;
59
+ });
44
60
  }
45
61
  }
46
62
 
@@ -66,10 +82,12 @@
66
82
  vertical-align: middle;
67
83
  white-space: nowrap;
68
84
 
69
- .s-tag-styles(@tags-border, @tags-background, @tags-color);
85
+ .s-tag-styles(var(--theme-tag-border-color), var(--theme-tag-background-color), var(--theme-tag-color));
86
+
87
+ .highcontrast-mode({ text-decoration: none; });
70
88
 
71
89
  &.is-selected {
72
- .s-tag-selected-styles(@tags-selected-border, @tags-selected-background, @tags-selected-color);
90
+ .s-tag-selected-styles(transparent, var(--theme-secondary-200), var(--theme-secondary-900));
73
91
  }
74
92
 
75
93
  // -- SIZES
@@ -100,7 +118,7 @@
100
118
 
101
119
  a.s-tag:not(.is-selected) {
102
120
  #stacks-internals #load-config();
103
- .s-tag-hover-styles(@tags-hover-border, @tags-hover-background, @tags-hover-color);
121
+ .s-tag-hover-styles(var(--theme-tag-hover-border-color), var(--theme-tag-hover-background-color), var(--theme-tag-hover-color));
104
122
  }
105
123
 
106
124
  // $$ DISMISS ICON
@@ -189,18 +207,3 @@ a.s-tag__muted:not(.is-selected) {
189
207
  #stacks-internals #load-config();
190
208
  .s-tag-hover-styles(@tags-muted-hover-border, @tags-muted-hover-background, @tags-muted-hover-color);
191
209
  }
192
-
193
- // $$ Themed Tag
194
- // ---------------------------------------------------------------------------
195
- .s-tag__themed {
196
- #stacks-internals #load-config();
197
- .s-tag-styles(var(--theme-primary-300), var(--theme-primary-050), var(--theme-primary-700));
198
-
199
- &.is-selected {
200
- .s-tag-selected-styles(transparent, var(--theme-primary-200), var(--theme-primary-900));
201
- }
202
- }
203
- a.s-tag__themed:not(.is-selected) {
204
- #stacks-internals #load-config();
205
- .s-tag-hover-styles(var(--theme-primary-400), var(--theme-primary-100), var(--theme-primary-900));
206
- }
@@ -49,6 +49,10 @@
49
49
  border-radius: 50%;
50
50
  background: @white;
51
51
  transition: left 0.1s ease;
52
+
53
+ .highcontrast-mode({
54
+ background: var(--white);
55
+ });
52
56
  }
53
57
 
54
58
  &:before {
@@ -112,12 +116,20 @@
112
116
  &.s-toggle-switch--label-off {
113
117
  background-color: var(--black-300);
114
118
  color: @white;
119
+
120
+ .highcontrast-mode({
121
+ color: var(--white);
122
+ });
115
123
  }
116
124
 
117
125
  // Color activated options green
118
126
  &:not(.s-toggle-switch--label-off) {
119
127
  background-color: var(--green-400);
120
128
  color: @white;
129
+
130
+ .highcontrast-mode({
131
+ color: var(--white);
132
+ });
121
133
  }
122
134
  }
123
135
  }
@@ -0,0 +1,440 @@
1
+ //
2
+ // STACK OVERFLOW
3
+ // TOPBAR
4
+ //
5
+ // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
6
+ // Stack Overflow. For documentation of all these classes and how to contribute,
7
+ // visit https://stackoverflow.design/
8
+ //
9
+ // ============================================================================
10
+ // $ BASE STYLE
11
+ // ----------------------------------------------------------------------------
12
+ .s-topbar {
13
+ min-width: auto;
14
+ box-shadow: var(--bs-sm);
15
+ width: 100%;
16
+ z-index: @zi-navigation-fixed;
17
+ background-color: var(--theme-topbar-background-color);
18
+ height: var(--theme-topbar-height);
19
+ display: flex;
20
+ border-top: var(--theme-topbar-accent-border);
21
+ position: relative;
22
+ align-items: center;
23
+
24
+ // Redefine the variables for extra contrast in high-contrast mode
25
+ .highcontrast-mode({
26
+ // Search input
27
+ --theme-topbar-search-color: var(--theme-topbar-item-color);
28
+ --theme-topbar-search-background: var(--theme-topbar-background-color);
29
+ --theme-topbar-search-placeholder: var(--theme-topbar-item-color);
30
+ --theme-topbar-search-border: var(--theme-topbar-item-color);
31
+ --theme-topbar-search-border-focus: var(--theme-topbar-item-color);
32
+
33
+ // Search switcher
34
+ --theme-topbar-select-color: var(--theme-topbar-item-color);
35
+ --theme-topbar-select-background: var(--theme-topbar-background-color);
36
+
37
+ // Topbar items
38
+ --theme-topbar-item-color: var(--black-800);
39
+ --theme-topbar-item-color-hover: var(--black-900);
40
+ --theme-topbar-item-background-hover: var(--black-200);
41
+ --theme-topbar-item-color-current: var(--black);
42
+ });
43
+
44
+ .highcontrast-mode({ border-bottom: 1px solid currentColor; });
45
+
46
+ // Wraps the content so the topbar stretches 100% w/ content at some value below that
47
+ .s-topbar--container {
48
+ width: @s-full; // wmx12; Consumers should use atomic classes to override this
49
+ max-width: 100%;
50
+ height: 100%;
51
+ display: flex;
52
+ margin: 0 auto;
53
+ align-items: center;
54
+ }
55
+
56
+ .s-topbar--logo {
57
+ padding: 0 @su8;
58
+ height: 100%;
59
+ display: flex;
60
+ align-items: center;
61
+ background-color: transparent;
62
+ }
63
+
64
+ a.s-topbar--logo:hover {
65
+ background-color: var(--theme-topbar-item-background-hover);
66
+ }
67
+
68
+ a.s-topbar--logo.is-selected {
69
+ background-color: var(--theme-topbar-item-background-hover);
70
+ }
71
+
72
+ .s-topbar--menu-btn {
73
+ display: flex;
74
+ height: 100%;
75
+ padding: 0 @su16;
76
+ flex-shrink: 0;
77
+ align-items: center;
78
+ justify-content: center;
79
+
80
+ // Build a hamburger icon manually using spans instead of using `@Svg` helper so
81
+ // we can more easily animate its content and transform the hamburger into an x
82
+ span {
83
+ &,
84
+ &:before,
85
+ &:after {
86
+ width: @su16;
87
+ height: @su2;
88
+ background-color: var(--theme-topbar-item-color);
89
+ position: relative;
90
+ }
91
+
92
+ &:before,
93
+ &:after {
94
+ position: absolute;
95
+ content: '';
96
+ left: 0;
97
+ top: -5px;
98
+ transition: top, transform;
99
+ transition-duration: 0.1s;
100
+ transition-timing-function: ease-in-out;
101
+ }
102
+
103
+ &:after {
104
+ top: 5px;
105
+ }
106
+ }
107
+
108
+ // Transforming hamburger into x
109
+ &.is-selected {
110
+ color: var(--theme-topbar-item-color-current);
111
+ background-color: var(--theme-topbar-item-background-current);
112
+
113
+ span {
114
+ background-color: transparent;
115
+
116
+ &:before,
117
+ &:after {
118
+ top: 0;
119
+ transform: rotate(-45deg);
120
+ }
121
+
122
+ &:after { transform: rotate(45deg); }
123
+ }
124
+ }
125
+
126
+ &:hover {
127
+ color: var(--theme-topbar-item-color-hover);
128
+ background-color: var(--theme-topbar-item-background-hover);
129
+ }
130
+ }
131
+
132
+ .s-navigation {
133
+ .s-navigation--item:not(.is-selected) {
134
+ color: var(--theme-topbar-item-color);
135
+ }
136
+
137
+ .s-navigation--item:not(.is-selected):hover {
138
+ color: var(--theme-topbar-item-color-hover);
139
+ background-color: var(--theme-topbar-item-background-hover);
140
+ }
141
+ }
142
+ }
143
+
144
+ // ===========================================================================
145
+ // $ LIGHT
146
+ // ---------------------------------------------------------------------------
147
+ .s-topbar__light {
148
+ // TODO this only works 100% perfectly in light mode, due to child elements inheriting current theme colors
149
+ // TODO extend forced light mode instead of overriding
150
+
151
+ --theme-topbar-background-color: @black-025;
152
+
153
+ // Search input
154
+ --theme-topbar-search-color: @black-700;
155
+ --theme-topbar-search-background: @white;
156
+ --theme-topbar-search-placeholder: @black-200;
157
+ --theme-topbar-search-border: @black-200;
158
+ --theme-topbar-search-border-focus: @blue-300;
159
+ --theme-topbar-search-shadow-focus: 0 0 0 @su4 var(--focus-ring);
160
+
161
+ // Search switcher
162
+ --theme-topbar-select-color: @black-700;
163
+ --theme-topbar-select-background: @black-050;
164
+
165
+ // Items
166
+ --theme-topbar-item-color: @black-600;
167
+ --theme-topbar-item-color-hover: @black-800;
168
+ --theme-topbar-item-background-hover: @black-075;
169
+ --theme-topbar-item-color-current: @black;
170
+ --theme-topbar-item-border-current: var(--theme-primary-color);
171
+
172
+ // TODO HACK remove everything below once light/dark topbars are inheriting forced themes correctly
173
+ // redefine the variables for extra contrast in high-contrast mode
174
+ .highcontrast-mode({
175
+ // Topbar items
176
+ --theme-topbar-item-color: @black-800;
177
+ --theme-topbar-item-color-hover: @black-900;
178
+ --theme-topbar-item-background-hover: @black-075;
179
+ --theme-topbar-item-color-current: @black;
180
+ });
181
+
182
+ --scrollbar: hsla(0, 0%, 0%, 0.2);
183
+ }
184
+
185
+ // ===========================================================================
186
+ // $ DARK
187
+ // ---------------------------------------------------------------------------
188
+ .s-topbar__dark {
189
+ // TODO this only works 100% perfectly in dark mode, due to child elements inheriting current theme colors
190
+ // TODO extend forced dark mode instead of overriding
191
+
192
+ @topbar-actual-background: @black-800;
193
+ // TODO
194
+ #calc-topbar-lightness-increase() when (lightness(@topbar-actual-background) < 15%) {
195
+ @topbar-search-lightness-increase: 20%;
196
+ }
197
+ #calc-topbar-lightness-increase() when not (lightness(@topbar-actual-background) < 15%) {
198
+ @topbar-search-lightness-increase: 10%;
199
+ }
200
+ #calc-topbar-lightness-increase();
201
+
202
+ --theme-topbar-background-color: @topbar-actual-background;
203
+
204
+ // Search input
205
+ --theme-topbar-search-color: lighten(@topbar-actual-background, 80% + @topbar-search-lightness-increase);
206
+ --theme-topbar-search-background: lighten(@topbar-actual-background, @topbar-search-lightness-increase);
207
+ --theme-topbar-search-placeholder: lighten(@topbar-actual-background, 60% + @topbar-search-lightness-increase);
208
+ --theme-topbar-search-border: lighten(@topbar-actual-background, 20% + @topbar-search-lightness-increase);
209
+ --theme-topbar-search-border-focus: lighten(@topbar-actual-background, 45% + @topbar-search-lightness-increase);
210
+ --theme-topbar-search-shadow-focus: 0 0 0 @su4 fade(@white, 30%);
211
+
212
+ // Search switcher
213
+ --theme-topbar-select-color: lighten(@topbar-actual-background, 60% + @topbar-search-lightness-increase);
214
+ --theme-topbar-select-background: lighten(@topbar-actual-background, 10% + @topbar-search-lightness-increase);
215
+
216
+ // Items
217
+ --theme-topbar-item-color: @black-025;
218
+ --theme-topbar-item-color-hover: @white;
219
+ --theme-topbar-item-background-hover: @black-700;
220
+ --theme-topbar-item-color-current: @white;
221
+ --theme-topbar-item-border-current: var(--theme-primary-color);
222
+
223
+ // Themed border accent
224
+ --theme-topbar-accent-border: none;
225
+
226
+ // TODO HACK remove everything below once light/dark topbars are inheriting forced themes correctly
227
+ // redefine the variables for extra contrast in high-contrast mode
228
+ .highcontrast-mode({
229
+ // Topbar items
230
+ --theme-topbar-item-color: @white;
231
+ --theme-topbar-item-color-hover: @white;
232
+ --theme-topbar-item-background-hover: @black-700;
233
+ --theme-topbar-item-color-current: @white;
234
+
235
+ .s-badge {
236
+ border-color: currentColor;
237
+ }
238
+ });
239
+
240
+ --scrollbar: hsla(0, 0%, 100%, 0.2);
241
+ }
242
+
243
+ // ===========================================================================
244
+ // $ CONTENT & CTAS
245
+ // ---------------------------------------------------------------------------
246
+ .s-topbar .s-topbar--content,
247
+ .s-topbar .s-topbar--ctas {
248
+ display: flex;
249
+ height: 100%;
250
+ .list-reset;
251
+
252
+ & > li {
253
+ display: inline-flex;
254
+ }
255
+ }
256
+
257
+ .s-topbar .s-topbar--content {
258
+ overflow-x: auto; // Allow this content to scroll if it gets too long
259
+ @scrollbar-styles(); // Style the scrollbars
260
+ margin-left: auto; // Push this section as far to the right as possible
261
+
262
+ .s-topbar--item {
263
+ color: var(--theme-topbar-item-color);
264
+ display: inline-flex;
265
+ align-items: center;
266
+ padding: 0 (@su12 - @su2);
267
+ text-decoration: none;
268
+ white-space: nowrap;
269
+ position: relative;
270
+
271
+ &:hover,
272
+ &:focus,
273
+ &.is-selected,
274
+ &.is-selected:hover,
275
+ &.is-selected:focus {
276
+ color: var(--theme-topbar-item-color-hover);
277
+ background-color: var(--theme-topbar-item-background-hover);
278
+ text-decoration: none;
279
+ outline: none;
280
+
281
+ .s-activity-indicator {
282
+ top: calc(50% - 18px);
283
+ }
284
+ }
285
+
286
+ .svg-icon {
287
+ vertical-align: text-top;
288
+ }
289
+
290
+ .s-activity-indicator {
291
+ position: absolute;
292
+ top: calc(50% - 14px);
293
+ right: 2px;
294
+ transition: top @te-smooth 0.15s;
295
+ }
296
+ }
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
+
311
+ .s-topbar--item {
312
+ align-self: center;
313
+ padding-top: @su8;
314
+ padding-bottom: @su8;
315
+ }
316
+ }
317
+
318
+ // ===========================================================================
319
+ // $ NOTICE
320
+ // ---------------------------------------------------------------------------
321
+ .s-topbar--notice {
322
+ &:extend(.s-badge);
323
+
324
+ text-transform: uppercase;
325
+ font-size: @fs-fine;
326
+ font-weight: 700;
327
+ margin-left: @su8;
328
+ margin-right: @su8;
329
+ flex-shrink: 0;
330
+
331
+ .badge-styles(transparent, transparent, var(--theme-topbar-item-color));
332
+
333
+ &:hover,
334
+ &:focus {
335
+ .badge-styles(var(--theme-topbar-item-background-hover), var(--theme-topbar-item-background-hover), var(--theme-topbar-item-color-hover));
336
+ }
337
+
338
+ &.is-unread {
339
+ .badge-styles(var(--theme-primary-color), var(--theme-primary-color), var(--white));
340
+
341
+ &:hover,
342
+ &:focus {
343
+ .badge-styles(var(--theme-primary-600), var(--theme-primary-600), var(--white));
344
+ }
345
+ }
346
+ }
347
+
348
+ // ===========================================================================
349
+ // $ SEARCHBAR
350
+ // ---------------------------------------------------------------------------
351
+ .s-topbar .s-topbar--searchbar {
352
+ @inputLineHeights: @lh-sm; // Ensure the line heights between the elements match up
353
+ padding: 0 @su8;
354
+ display: flex;
355
+ align-items: center;
356
+ flex-shrink: 10000; // Force the searchbar to shrink as much as possible if there's no extra space
357
+ flex-grow: 1; //...but allow it to grow if there *is* extra space
358
+
359
+ .s-topbar--searchbar--input-group {
360
+ position: relative;
361
+ flex-grow: 1;
362
+
363
+ .s-input {
364
+ border-color: var(--theme-topbar-search-border);
365
+ background-color: var(--theme-topbar-search-background);
366
+ box-shadow: var(--theme-topbar-search-shadow);
367
+ color: var(--theme-topbar-search-color);
368
+ display: block;
369
+ line-height: @inputLineHeights;
370
+
371
+ &:focus {
372
+ border-color: var(--theme-topbar-search-border-focus);
373
+ box-shadow: var(--theme-topbar-search-shadow-focus);
374
+ }
375
+
376
+ &::placeholder {
377
+ color: var(--theme-topbar-search-placeholder);
378
+ font-style: normal;
379
+ }
380
+ }
381
+
382
+ .s-input-icon {
383
+ color: var(--theme-topbar-search-placeholder);
384
+ }
385
+ }
386
+
387
+ .s-select {
388
+ .wmx2;
389
+
390
+ align-self: stretch;
391
+ margin-right: -1px;
392
+ color: var(--theme-topbar-select-color);
393
+
394
+ &:before,
395
+ &:after {
396
+ z-index: @zi-active; // Make sure our focus ring is above the search input
397
+ }
398
+ }
399
+
400
+ .s-select > select {
401
+ .brr0;
402
+ height: 100%;
403
+ line-height: @inputLineHeights;
404
+
405
+ border-color: var(--theme-topbar-search-border);
406
+ background-color: var(--theme-topbar-select-background);
407
+ color: var(--theme-topbar-select-color);
408
+
409
+ &:focus {
410
+ border-color: var(--theme-topbar-search-border-focus);
411
+ box-shadow: var(--theme-topbar-search-shadow-focus);
412
+ z-index: @zi-selected;
413
+ }
414
+ }
415
+
416
+ // Drop the left border of the search input when it is next to the select
417
+ .s-select + .s-topbar--searchbar--input-group > .s-input {
418
+ .blr0;
419
+ }
420
+
421
+ #stacks-internals #screen-sm({
422
+ display: none;
423
+ position: absolute;
424
+ left: 0;
425
+ right: 0;
426
+ top: 100%;
427
+ max-width: 100%;
428
+ padding: @su8 @su12;
429
+ background: var(--theme-topbar-item-background-hover);
430
+
431
+ &.s-topbar--searchbar__open {
432
+ display: flex;
433
+ max-width: none;
434
+ }
435
+
436
+ .s-select {
437
+ .w25;
438
+ }
439
+ });
440
+ }