@stackoverflow/stacks 1.6.4 → 1.6.6

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.
@@ -1,15 +1,24 @@
1
1
  .s-sidebarwidget {
2
- // CONSTANTS
3
- --_sw-content-px: calc(var(--su16) - var(--su1)); // subtract 1px for border
4
- --_sw-content-spacing-inner: var(--su12); // the spacing between two adjacent simple items
5
- --_sw-content-spacing-outer: var(--su16); // the spacing at the start/end of a group of simple items, as well as between a complex item and its separator line
6
-
7
- // VARIABLES
2
+ // COMPONENT-SPECIFIC CONSTANTS
3
+ @sw-content-px: calc(var(--su16) - var(--su1)); // subtract 1px for border
4
+ @sw-content-spacing-inner: var(--su12); // the spacing between two adjacent simple items
5
+ @sw-content-spacing-outer: var(--su16); // the spacing at the start/end of a group of simple items, as well as between a complex item and its separator line
6
+ // COMPONENT-SPECIFIC CUSTOM PROPERTIES
8
7
  --_sw-bc: var(--bc-medium);
9
8
  --_sw-after-bc: var(--_sw-bc);
10
9
  --_sw-content-bc: var(--bc-light);
11
10
  --_sw-header-bc: var(--_sw-content-bc);
12
11
 
12
+ // MODIFIERS
13
+ &:not(.s-anchors) {
14
+ a:not(.button):not(.post-tag):not(.s-btn):not(.s-sidebarwidget--action):not(.s-user-card--link) {
15
+ &,
16
+ &:visited {
17
+ color: var(--black-500);
18
+ }
19
+ }
20
+ }
21
+
13
22
  // VARIANTS
14
23
  .alternate-color(blue);
15
24
  .alternate-color(yellow);
@@ -25,64 +34,66 @@
25
34
  }
26
35
 
27
36
  & &--content {
37
+ &:not(table) {
38
+ &:not(.s-sidebarwidget__items),
39
+ &:not(.s-sidebarwidget__block-items) .s-sidebarwidget--item {
40
+ display: flex;
41
+ }
42
+ }
43
+
28
44
  &.s-sidebarwidget__items {
29
45
  &,
30
46
  &.s-sidebarwidget__block-items .s-sidebarwidget--item {
31
47
  display: block;
32
48
  }
33
49
 
34
- padding: calc(var(--_sw-content-spacing-outer) - var(--_sw-content-spacing-inner)) var(--_sw-content-px); // the items themselves provide part of the spacing, so the content padding needs to account for that
50
+ padding: calc(@sw-content-spacing-outer - @sw-content-spacing-inner) @sw-content-px; // the items themselves provide part of the spacing, so the content padding needs to account for that
35
51
  }
36
52
 
37
53
  &:active {
38
54
  outline: none;
39
55
  }
40
56
 
41
- &:not(table) {
42
- &:not(.s-sidebarwidget__items),
43
- &:not(.s-sidebarwidget__block-items) .s-sidebarwidget--item {
44
- display: flex;
45
- }
46
- }
47
-
48
57
  border-top: var(--su-static1) solid var(--_sw-content-bc);
49
58
  margin: 0;
50
- padding: var(--_sw-content-spacing-outer) var(--_sw-content-px);
59
+ padding: @sw-content-spacing-outer @sw-content-px;
51
60
  }
52
61
 
53
62
  & &--header {
54
- &.s-sidebarwidget__expanding-control {
55
- &:before {
56
- border: calc(var(--su-static4) + var(--su-static1)) solid transparent;
57
- border-left-color: var(--bc-darker);
58
- border-right-width: 0;
59
- content: '';
60
- float: left;
61
- margin-right: var(--su12);
62
- margin-top: calc(calc(var(--lh-base) * 1em) / 2 - 5px); // 1.3 is our standard line height
63
- transition: transform 0.3s cubic-bezier(0.4, 0.4, 0.6, 1);
64
- }
63
+ &:first-child {
64
+ border-top-left-radius: var(--br-sm);
65
+ border-top-right-radius: var(--br-sm);
66
+ }
65
67
 
66
- &[aria-expanded='true']:before {
67
- transform: rotate(90deg);
68
- }
68
+ &.s-sidebarwidget {
69
+ &__expanding-control {
70
+ &:before {
71
+ border: calc(var(--su-static4) + var(--su-static1)) solid transparent;
72
+ border-left-color: var(--bc-darker);
73
+ border-right-width: 0;
74
+ content: '';
75
+ float: left;
76
+ margin-right: var(--su12);
77
+ margin-top: calc(calc(var(--lh-base) * 1em) / 2 - 5px); // 1.3 is our standard line height
78
+ transition: transform 0.3s cubic-bezier(0.4, 0.4, 0.6, 1);
79
+ }
69
80
 
70
- cursor: pointer;
71
- }
81
+ &[aria-expanded='true']:before {
82
+ transform: rotate(90deg);
83
+ }
72
84
 
73
- &.s-sidebarwidget__small-bold-text {
74
- .s-sidebarwidget--action {
75
- font-weight: normal;
76
- 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
85
+ cursor: pointer;
77
86
  }
78
87
 
79
- font-size: var(--fs-caption);
80
- font-weight: bold;
81
- }
88
+ &__small-bold-text {
89
+ .s-sidebarwidget--action {
90
+ font-weight: normal;
91
+ 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
92
+ }
82
93
 
83
- &:first-child {
84
- border-top-left-radius: var(--br-sm);
85
- border-top-right-radius: var(--br-sm);
94
+ font-size: var(--fs-caption);
95
+ font-weight: bold;
96
+ }
86
97
  }
87
98
 
88
99
  &:active {
@@ -95,7 +106,7 @@
95
106
  font-size: var(--fs-body2);
96
107
  font-weight: normal;
97
108
  margin: 0;
98
- padding: var(--_sw-content-spacing-inner) var(--_sw-content-px);
109
+ padding: @sw-content-spacing-inner @sw-content-px;
99
110
  }
100
111
 
101
112
  & &--item {
@@ -108,16 +119,18 @@
108
119
  border-left-style: solid;
109
120
  border-left-width: calc(var(--su-static1) * 3); // 3px
110
121
  content: '';
111
- height: calc(100% + var(--_sw-content-spacing-inner));
122
+ height: calc(100% + @sw-content-spacing-inner);
112
123
  left: 0;
113
- margin-left: calc(var(--_sw-content-px) * -1 - var(--su-static1)); // the orange selection indicator overlaps with the widget border
114
- margin-top: calc(var(--_sw-content-spacing-inner) / 2 * -1);
124
+ margin-left: calc(@sw-content-px * -1 - var(--su-static1)); // the orange selection indicator overlaps with the widget border
125
+ margin-top: calc(@sw-content-spacing-inner / 2 * -1);
115
126
  position: absolute;
116
127
  }
117
128
 
118
- a,
119
- a:visited { // 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
120
- color: inherit;
129
+ 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
130
+ &,
131
+ &:visited {
132
+ color: inherit;
133
+ }
121
134
  }
122
135
 
123
136
  color: var(--black);
@@ -126,16 +139,18 @@
126
139
  }
127
140
  }
128
141
 
129
- margin: var(--_sw-content-spacing-inner) 0;
142
+ margin: @sw-content-spacing-inner 0;
130
143
  }
131
144
 
132
145
  & &--subnav {
133
146
  li {
134
147
  &[aria-current="page"],
135
148
  &[aria-current="true"] {
136
- a,
137
- a:visited {
138
- color: inherit;
149
+ a {
150
+ &,
151
+ &:visited {
152
+ color: inherit;
153
+ }
139
154
  }
140
155
 
141
156
  #stacks-internals #bullet-arrow(var(--theme-primary-color));
@@ -166,15 +181,8 @@
166
181
  }
167
182
 
168
183
  border-collapse: separate;
169
- border-spacing: var(--_sw-content-spacing-inner);
170
- padding: calc(var(--_sw-content-spacing-outer) - var(--_sw-content-spacing-inner)) calc(var(--_sw-content-px) - var(--_sw-content-spacing-inner));
171
- }
172
-
173
- &:not(.s-anchors) a:not(.button):not(.s-btn):not(.post-tag):not(&--action):not(.s-user-card--link) {
174
- &,
175
- &:visited {
176
- color: var(--black-500);
177
- }
184
+ border-spacing: @sw-content-spacing-inner;
185
+ padding: calc(@sw-content-spacing-outer - @sw-content-spacing-inner) calc(@sw-content-px - @sw-content-spacing-inner);
178
186
  }
179
187
 
180
188
  &:before { // [1]
@@ -215,15 +223,15 @@
215
223
  --_sw-bc: var(~"--@{name}-700");
216
224
  });
217
225
 
226
+ &:after,
227
+ .s-sidebarwidget--content,
218
228
  .s-sidebarwidget--header {
219
- background-color: var(~"--@{name}-100");
220
- color: var(--fc-medium);
229
+ border-color: var(--_sw-bc);
221
230
  }
222
231
 
223
- .s-sidebarwidget--header,
224
- .s-sidebarwidget--content,
225
- &:after {
226
- border-color: var(--_sw-bc);
232
+ .s-sidebarwidget--header {
233
+ background-color: var(~"--@{name}-100");
234
+ color: var(--fc-medium);
227
235
  }
228
236
 
229
237
  background-color: var(~"--@{name}-050");
@@ -7,22 +7,25 @@
7
7
  --_sp-baw: var(--su-static1);
8
8
  --_sp-size: var(--su-static12);
9
9
  }
10
+
10
11
  &&__sm {
11
12
  --_sp-baw: var(--su-static2);
12
13
  --_sp-size: var(--su-static16);
13
14
  }
15
+
14
16
  &&__md {
15
17
  --_sp-baw: var(--su-static4);
16
18
  --_sp-size: var(--su-static32);
17
19
  }
20
+
18
21
  &&__lg {
19
22
  --_sp-baw: var(--su-static6);
20
23
  --_sp-size: var(--su-static48);
21
24
  }
22
25
 
23
26
  // CHILD ELEMENTS
24
- &:before,
25
- &:after {
27
+ &:after,
28
+ &:before {
26
29
  border: var(--_sp-baw) solid currentColor;
27
30
 
28
31
  border-radius: var(--br-circle);
@@ -31,10 +34,7 @@
31
34
  position: absolute;
32
35
  width: 100%;
33
36
  }
34
- &:before {
35
- opacity: 0.25;
36
- transform: rotate(90deg); // [1]
37
- }
37
+
38
38
  &:after {
39
39
  border-top-color: transparent;
40
40
  border-right-color: transparent;
@@ -42,6 +42,11 @@
42
42
  animation: s-spinner-rotate 0.9s infinite cubic-bezier(0.5, 0.1, 0.5, 0.9);
43
43
  }
44
44
 
45
+ &:before {
46
+ opacity: 0.25;
47
+ transform: rotate(90deg); // [1]
48
+ }
49
+
45
50
  height: var(--_sp-size);
46
51
  width: var(--_sp-size);
47
52
 
@@ -53,8 +58,8 @@
53
58
  --_li-offset: 0.6em;
54
59
  --_il-size: 1.23076923em;
55
60
 
56
- &:before,
57
- &:after {
61
+ &:after,
62
+ &:before {
58
63
  border-radius: var(--br-circle);
59
64
  border-style: solid;
60
65
  border-width: var(--su-static2);
@@ -65,10 +70,7 @@
65
70
  top: calc(50% - var(--_li-offset));
66
71
  width: var(--_il-size);
67
72
  }
68
- &:before {
69
- border-color: currentColor;
70
- opacity: 0.3;
71
- }
73
+
72
74
  &:after {
73
75
  animation: s-spinner-rotate 0.9s infinite cubic-bezier(0.5, 0.1, 0.5, 0.9);
74
76
  border-color: transparent;
@@ -77,6 +79,11 @@
77
79
  transform-origin: 50% 50% 1px; // [1]
78
80
  }
79
81
 
82
+ &:before {
83
+ border-color: currentColor;
84
+ opacity: 0.3;
85
+ }
86
+
80
87
  padding-left: 2.2em;
81
88
  position: relative;
82
89
  }
@@ -92,4 +99,5 @@
92
99
  }
93
100
 
94
101
  // [1] no-op to reduce wobble in Edge. More info: https://github.com/StackExchange/Stacks/blob/d2af26aca06c47e3f1f7a638e49b221a9e28e450/lib/css/components/_stacks-spinner.less#L16-L26
95
- // [2] When within a parent that has text-align: center, the spinner's entire container spins, not just the spinner. Let's force text-align left so things spin internally.
102
+
103
+ // [2] When within a parent that has text-align: center, the spinner's entire container spins, not just the spinner. Let's force text-align left so things spin internally.
@@ -1,25 +1,24 @@
1
1
  .s-tag {
2
2
  --_ta-bc: var(--theme-tag-border-color);
3
+ --_ta-bc-hover: var(--theme-tag-hover-border-color);
4
+ --_ta-bc-selected: transparent;
3
5
  --_ta-bg: var(--theme-tag-background-color);
6
+ --_ta-bg-hover: var(--theme-tag-hover-background-color);
7
+ --_ta-bg-selected: var(--theme-secondary-200);
4
8
  --_ta-br: var(--br-sm);
5
9
  --_ta-fc: var(--theme-tag-color);
10
+ --_ta-fc-hover: var(--theme-tag-hover-color);
11
+ --_ta-fc-selected: var(--theme-secondary-900);
6
12
  --_ta-fs: var(--fs-caption);
7
13
  --_ta-lh: 1.846153846;
8
14
  --_ta-pl: var(--_ta-px);
9
15
  --_ta-pr: var(--_ta-px);
10
16
  --_ta-px: var(--su4);
11
- // hover, focus, active
12
- --_ta-bc-hover: var(--theme-tag-hover-border-color);
13
- --_ta-bg-hover: var(--theme-tag-hover-background-color);
14
- --_ta-fc-hover: var(--theme-tag-hover-color);
15
- // .is-selected
16
- --_ta-bc-selected: transparent;
17
- --_ta-bg-selected: var(--theme-secondary-200);
18
- --_ta-fc-selected: var(--theme-secondary-900);
19
17
 
20
18
  // CONTEXTUAL STYLES
21
19
  .highcontrast-mode({
22
20
  --_ta-bc: currentColor;
21
+
23
22
  text-decoration: none;
24
23
  });
25
24
 
@@ -30,13 +29,13 @@
30
29
  a&:active,
31
30
  a&:hover,
32
31
  a&:focus {
33
- background-color: var(--_ta-bg-selected);
34
- border-color: var(--_ta-bc-selected);
35
- color: var(--_ta-fc-selected);
36
-
37
32
  .highcontrast-mode({
38
33
  border-color: currentColor;
39
34
  });
35
+
36
+ background-color: var(--_ta-bg-selected);
37
+ border-color: var(--_ta-bc-selected);
38
+ color: var(--_ta-fc-selected);
40
39
  }
41
40
  }
42
41
 
@@ -89,12 +88,15 @@
89
88
  -webkit-mask-size: contain;
90
89
  mask-size: contain;
91
90
  }
91
+
92
92
  position: relative;
93
93
  }
94
+
94
95
  &__ignored, // TODO: remove all single `&` ignored styles once core no longer requires them
95
96
  &&__ignored {
96
97
  --_ta-before-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.52 7.38 1.58 9.26A12.38 12.38 0 0 1 0 7s2.63-5.14 7.05-5.14c.66 0 1.28.12 1.86.32L7.44 3.6a3.48 3.48 0 0 0-3.92 3.78ZM5.3 9.99c.5.28 1.1.44 1.71.44 1.94 0 3.5-1.53 3.5-3.43 0-.62-.17-1.21-.47-1.72L8.7 6.6a1.73 1.73 0 0 1-2.08 2.07L5.29 10Zm6.23-6.19A12.7 12.7 0 0 1 14 7s-2.63 5.14-6.95 5.14A6.1 6.1 0 0 1 4 11.3L2.27 13l-1.4-1.36L11.9 1l1.23 1.2-1.6 1.6Z'/%3E%3C/svg%3E");
97
98
  }
99
+
98
100
  // moderator overrides other muted and required, required overrides muted
99
101
  &&__moderator {
100
102
  --_ta-bc: var(--red-200);
@@ -107,6 +109,7 @@
107
109
  --_ta-bg-selected: var(--red-200);
108
110
  --_ta-fc-selected: var(--red-800);
109
111
  }
112
+
110
113
  &&__muted:not(&__moderator):not(&__required) {
111
114
  --_ta-bc: transparent;
112
115
  --_ta-bg: var(--black-075);
@@ -120,6 +123,7 @@
120
123
 
121
124
  .highcontrast-mode({ --_ta-bc: currentColor; }); // Specificity has bit us, so we need this override
122
125
  }
126
+
123
127
  &&__required:not(&__moderator) {
124
128
  --_ta-bc: var(--bc-darker);
125
129
  --_ta-bg: var(--black-075);
@@ -160,6 +164,7 @@
160
164
  padding: var(--su1);
161
165
  width: var(--su-static16);
162
166
  }
167
+
163
168
  & &--sponsor { // The small sponsor favicon displayed within a tag
164
169
  img,
165
170
  .svg-icon {
@@ -179,13 +184,13 @@
179
184
  &:hover,
180
185
  &:focus,
181
186
  &:active {
182
- background-color: var(--_ta-bg-hover);
183
- border-color: var(--_ta-bc-hover);
184
- color: var(--_ta-fc-hover);
185
-
186
187
  .highcontrast-mode({
187
188
  border-color: currentColor;
188
189
  });
190
+
191
+ background-color: var(--_ta-bg-hover);
192
+ border-color: var(--_ta-bc-hover);
193
+ color: var(--_ta-fc-hover);
189
194
  }
190
195
  }
191
196
 
@@ -2,29 +2,34 @@
2
2
  --_ts-bg: var(--black-300);
3
3
  --_ts-bg-ps: left center;
4
4
  --_ts-bs-color: transparent;
5
- // multiple
6
5
  --_ts-multiple-bg: unset;
7
6
  --_ts-multiple-fc: var(--black-500);
8
7
 
9
- // TODO split single and multiple toggle into two seperate components
10
- &&__multiple {
8
+ &&__multiple { // TODO split single and multiple toggle into two seperate components
11
9
  input[type="radio"] {
12
10
  &:checked {
13
11
  + label {
14
12
  &.s-toggle-switch--label-off {
15
13
  --_ts-multiple-bg: var(--black-500);
16
14
  --_ts-multiple-fc: var(--white);
15
+
17
16
  .dark-mode({ --_ts-multiple-bg: var(--black-350); });
18
17
  }
18
+
19
19
  &:not(.s-toggle-switch--label-off) {
20
20
  --_ts-multiple-bg: var(--green-400);
21
21
  --_ts-multiple-fc: @white;
22
+
22
23
  .highcontrast-mode({ --_ts-multiple-fc: var(--white); });
23
24
  }
24
25
  }
26
+
25
27
  &:focus + label {
26
28
  --_ts-bs-color: var(--focus-ring-success);
27
- &.s-toggle-switch--label-off { --_ts-bs-color: var(--focus-ring-muted); }
29
+
30
+ &.s-toggle-switch--label-off {
31
+ --_ts-bs-color: var(--focus-ring-muted);
32
+ }
28
33
  }
29
34
  }
30
35
 
@@ -33,6 +38,7 @@
33
38
  opacity: 0;
34
39
  position: absolute;
35
40
  }
41
+
36
42
  label {
37
43
  background-color: var(--_ts-multiple-bg);
38
44
  box-shadow: 0 0 0 var(--su-static4) var(--_ts-bs-color);
@@ -67,10 +73,12 @@
67
73
  --_ts-bs-color: var(--focus-ring-success);
68
74
  }
69
75
  }
76
+
70
77
  &:focus {
71
78
  --_ts-bs-color: var(--focus-ring-muted);
72
79
  outline: none;
73
80
  }
81
+
74
82
  &[disabled] {
75
83
  cursor: default;
76
84
  }
@@ -1,12 +1,16 @@
1
1
  .s-uploader {
2
+ // COMPONENT-SPECIFIC CONSTANTS
3
+ --_up-bg-b-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='5' ry='5' stroke='%23000000' stroke-width='8' stroke-dasharray='7%2c 22' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e"); // Keeping this a custom property to save a few bytes
4
+ // COMPONENT-SPECIFIC CUSTOM PROPERTIES
2
5
  --_up-bg: var(--black-025);
3
6
  --_up-bg-focus: var(--black-050);
4
7
  --_up-bg-bc: var(--black-150);
5
8
  --_up-focus-ring-color: var(--focus-ring);
6
- --_up-bg-b-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='5' ry='5' stroke='%23000000' stroke-width='8' stroke-dasharray='7%2c 22' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
7
9
 
8
10
  // CONTEXTUAL STYLES
9
- .highcontrast-mode({ --_up-bg-bc-hc: var(--black-400); });
11
+ .highcontrast-mode({
12
+ --_up-bg-bc-hc: var(--black-400);
13
+ });
10
14
 
11
15
  // STATES
12
16
  &.has-error,
@@ -16,6 +20,7 @@
16
20
  color: var(--_up-link-fc);
17
21
  }
18
22
  }
23
+
19
24
  &.has-error {
20
25
  --_up-bg: var(--red-050);
21
26
  --_up-bg-focus: var(--red-100);
@@ -24,6 +29,7 @@
24
29
  --_up-focus-ring-color: var(--focus-ring-error);
25
30
  --_up-link-fc: var(--red-900);
26
31
  }
32
+
27
33
  &.has-success {
28
34
  --_up-bg: var(--green-025);
29
35
  --_up-bg-focus: var(--green-050);
@@ -32,6 +38,7 @@
32
38
  --_up-focus-ring-color: var(--focus-ring-success);
33
39
  --_up-link-fc: var(--green-900);
34
40
  }
41
+
35
42
  &.has-warning {
36
43
  --_up-bg: var(--yellow-050);
37
44
  --_up-bg-focus: var(--yellow-100);
@@ -40,26 +47,27 @@
40
47
  --_up-focus-ring-color: var(--focus-ring-warning);
41
48
  --_up-link-fc: var(--yellow-900);
42
49
  }
50
+
43
51
  &.is-active {
44
52
  --_up-bg: var(--black-050);
45
53
  --_up-bg-bc: var(--black-200);
46
54
  }
55
+
47
56
  &.is-disabled {
48
57
  opacity: var(--_o-disabled-static);
49
58
  }
50
59
 
51
-
52
60
  // CHILD ELEMENTS
53
61
  & &--container {
54
62
  &:before { // Add the dashed border as an SVG background mask
55
63
  -webkit-mask-image: var(--_up-bg-b-image);
56
64
  mask-image: var(--_up-bg-b-image);
57
65
  background-color: var(--_up-bg-bc-hc-state, var(--_up-bg-bc-hc, var(--_up-bg-bc)));
58
- content: '';
59
66
  border-radius: var(--br-lg);
67
+ content: '';
60
68
  display: block;
61
- position: absolute;
62
69
  inset: 0;
70
+ position: absolute;
63
71
  }
64
72
 
65
73
  align-items: center;
@@ -73,6 +81,7 @@
73
81
  position: relative;
74
82
  text-align: center;
75
83
  }
84
+
76
85
  & &--input {
77
86
  &:focus:focus-visible + .s-uploader--container {
78
87
  background-color: var(--_up-bg-focus);
@@ -87,12 +96,16 @@
87
96
  width: 100%;
88
97
  z-index: var(--zi-selected);
89
98
  }
99
+
90
100
  & &--preview {
91
101
  max-width: 100%;
92
102
  pointer-events: none;
93
103
  }
104
+
94
105
  & &--preview-thumbnail {
95
- .highcontrast-mode({ border: 1px solid var(--black); });
106
+ .highcontrast-mode({
107
+ border: var(--su-static1) solid var(--black);
108
+ });
96
109
 
97
110
  &:is(img) {
98
111
  object-fit: scale-down;
@@ -112,6 +125,7 @@
112
125
  text-overflow: ellipsis;
113
126
  white-space: nowrap;
114
127
  }
128
+
115
129
  & &--previews {
116
130
  &.has-multiple {
117
131
  display: block;
@@ -120,11 +134,6 @@
120
134
  width: 100%;
121
135
 
122
136
  .s-uploader--preview {
123
- align-items: center;
124
- display: flex;
125
- padding: var(--su6) 0;
126
- width: 100%;
127
-
128
137
  &:after {
129
138
  content: attr(data-filename);
130
139
  display: block;
@@ -134,13 +143,14 @@
134
143
  text-overflow: ellipsis;
135
144
  white-space: nowrap;
136
145
  }
146
+
147
+ align-items: center;
148
+ display: flex;
149
+ padding: var(--su6) 0;
150
+ width: 100%;
137
151
  }
138
- .s-uploader--preview-thumbnail {
139
- color: transparent;
140
- height: var(--su-static32);
141
- flex-shrink: 0;
142
- width: var(--su-static32);
143
152
 
153
+ .s-uploader--preview-thumbnail {
144
154
  &:is(img) {
145
155
  object-fit: cover;
146
156
  }
@@ -149,24 +159,32 @@
149
159
  background-position: center;
150
160
  background-repeat: no-repeat;
151
161
  }
162
+
163
+ color: transparent;
164
+ height: var(--su-static32);
165
+ flex-shrink: 0;
166
+ width: var(--su-static32);
152
167
  }
153
168
  }
154
169
 
155
170
  max-width: 100%;
156
171
  text-align: left;
157
172
  }
173
+
158
174
  & &--previews-heading {
159
175
  color: var(--black-900);
160
176
  font-size: var(--fs-body2);
161
177
  font-weight: 600;
162
178
  padding-bottom: var(--su8);
163
179
  }
180
+
164
181
  & &--reset {
165
182
  position: absolute;
166
183
  right: var(--su8);
167
184
  top: var(--su8);
168
185
  z-index: var(--zi-active);
169
186
  }
187
+
170
188
  // This is for safari shadow DOM
171
189
  // see https://github.com/StackExchange/Stacks/pull/690#issuecomment-861028193
172
190
  input[type="file"]::file-selector-button {