@stackoverflow/stacks 1.4.0 → 1.4.2
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.
- package/dist/css/stacks.css +84 -78
- package/dist/css/stacks.min.css +1 -1
- package/lib/css/atomic/gap.less +13 -13
- package/lib/css/components/_styles-template.less +7 -4
- package/lib/css/components/activity-indicator.less +1 -0
- package/lib/css/components/avatars.less +2 -1
- package/lib/css/components/badges.less +3 -0
- package/lib/css/components/cards.less +4 -1
- package/lib/css/components/empty-states.less +6 -5
- package/lib/css/components/labels.less +1 -1
- package/lib/css/components/menu.less +2 -0
- package/lib/css/components/navigation.less +1 -2
- package/lib/css/components/page-titles.less +1 -13
- package/lib/css/components/pagination.less +1 -1
- package/lib/css/components/prose.less +0 -12
- package/lib/css/components/tags.less +22 -17
- package/lib/css/components/uploader.less +48 -57
- package/package.json +2 -2
package/lib/css/atomic/gap.less
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#stacks-internals #responsify('.g0', { --_gap-
|
|
2
|
-
#stacks-internals #responsify('.g1', { --_gap-
|
|
3
|
-
#stacks-internals #responsify('.g2', { --_gap-
|
|
4
|
-
#stacks-internals #responsify('.g4', { --_gap-
|
|
5
|
-
#stacks-internals #responsify('.g6', { --_gap-
|
|
6
|
-
#stacks-internals #responsify('.g8', { --_gap-
|
|
7
|
-
#stacks-internals #responsify('.g12', { --_gap-
|
|
8
|
-
#stacks-internals #responsify('.g16', { --_gap-
|
|
9
|
-
#stacks-internals #responsify('.g24', { --_gap-
|
|
10
|
-
#stacks-internals #responsify('.g32', { --_gap-
|
|
11
|
-
#stacks-internals #responsify('.g48', { --_gap-
|
|
12
|
-
#stacks-internals #responsify('.g64', { --_gap-
|
|
1
|
+
#stacks-internals #responsify('.g0', { --_gap-y: 0; --_gap-x: 0; });
|
|
2
|
+
#stacks-internals #responsify('.g1', { --_gap-y: var(--su1); --_gap-x: var(--su1); });
|
|
3
|
+
#stacks-internals #responsify('.g2', { --_gap-y: var(--su2); --_gap-x: var(--su2); });
|
|
4
|
+
#stacks-internals #responsify('.g4', { --_gap-y: var(--su4); --_gap-x: var(--su4); });
|
|
5
|
+
#stacks-internals #responsify('.g6', { --_gap-y: var(--su6); --_gap-x: var(--su6); });
|
|
6
|
+
#stacks-internals #responsify('.g8', { --_gap-y: var(--su8); --_gap-x: var(--su8); });
|
|
7
|
+
#stacks-internals #responsify('.g12', { --_gap-y: var(--su12); --_gap-x: var(--su12); });
|
|
8
|
+
#stacks-internals #responsify('.g16', { --_gap-y: var(--su16); --_gap-x: var(--su16); });
|
|
9
|
+
#stacks-internals #responsify('.g24', { --_gap-y: var(--su24); --_gap-x: var(--su24); });
|
|
10
|
+
#stacks-internals #responsify('.g32', { --_gap-y: var(--su32); --_gap-x: var(--su32); });
|
|
11
|
+
#stacks-internals #responsify('.g48', { --_gap-y: var(--su48); --_gap-x: var(--su48); });
|
|
12
|
+
#stacks-internals #responsify('.g64', { --_gap-y: var(--su64); --_gap-x: var(--su64); });
|
|
13
13
|
|
|
14
14
|
#stacks-internals #responsify('.gx0', { --_gap-x: 0; });
|
|
15
15
|
#stacks-internals #responsify('.gx1', { --_gap-x: var(--su1); });
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
.gx0, .gx1, .gx2, .gx4, .gx6, .gx8, .gx12, .gx16, .gx24, .gx32, .gx48, .gx64,
|
|
41
41
|
.gy0, .gy1, .gy2, .gy4, .gy6, .gy8, .gy12, .gy16, .gy24, .gy32, .gy48, .gy64,
|
|
42
42
|
.g0, .g1, .g2, .g4, .g6, .g8, .g12, .g16, .g24, .g32, .g48, .g64 {
|
|
43
|
-
gap: var(--_gap-
|
|
43
|
+
gap: var(--_gap-y, 0) var(--_gap-x, 0);
|
|
44
44
|
}
|
|
@@ -26,6 +26,12 @@
|
|
|
26
26
|
--_cn-bg: transparent;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
// STATES
|
|
30
|
+
// These are generally classes prefixed with `.is-` or `.has-`
|
|
31
|
+
&.is-selected {
|
|
32
|
+
--_cn-bg: var(--orange-200);
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
// MODIFIERS
|
|
30
36
|
// Modifiers are considered to be classes that can be combined with other modifiers outside of their respective groupings without collisions
|
|
31
37
|
// Sizes
|
|
@@ -51,14 +57,11 @@
|
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
// CHILD ELEMENTS
|
|
54
|
-
&--image {
|
|
60
|
+
& &--image {
|
|
55
61
|
background-color: var(--_cn-image-bg);
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
// INTERACTION
|
|
59
|
-
.is-selected {
|
|
60
|
-
--_cn-bg: var(--orange-200);
|
|
61
|
-
}
|
|
62
65
|
&:hover {
|
|
63
66
|
--_cn-bg: var(--_black-050);
|
|
64
67
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
--_av-fs-letter: calc(var(--su-static12) - var(--su-static1));
|
|
6
6
|
--_av-scale-badge: 1;
|
|
7
7
|
|
|
8
|
+
// CONTEXTUAL STYLES
|
|
8
9
|
.highcontrast-mode({
|
|
9
10
|
background-color: var(--black);
|
|
10
11
|
box-shadow: 0 0 0 1px var(--black);
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
}
|
|
16
17
|
});
|
|
17
18
|
|
|
18
|
-
//
|
|
19
|
+
// MODIFIERS
|
|
19
20
|
// Sizes
|
|
20
21
|
&&__32,
|
|
21
22
|
&&__48 {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
--_ba-py: 0;
|
|
11
11
|
--_ba-wmn: 0;
|
|
12
12
|
|
|
13
|
+
// CONTEXTUAL STYLES
|
|
13
14
|
.highcontrast-mode({
|
|
14
15
|
// Badge counts
|
|
15
16
|
&__gold,
|
|
@@ -193,6 +194,7 @@
|
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
|
|
197
|
+
// CHILD ELEMENTS
|
|
196
198
|
& &--image {
|
|
197
199
|
display: inline-flex;
|
|
198
200
|
align-self: center;
|
|
@@ -200,6 +202,7 @@
|
|
|
200
202
|
margin-left: calc((var(--su4) + var(--su1)) * -1);
|
|
201
203
|
}
|
|
202
204
|
|
|
205
|
+
// INTERACTION
|
|
203
206
|
a&:hover {
|
|
204
207
|
text-decoration: none;
|
|
205
208
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
.s-card {
|
|
2
2
|
--_ca-bc: var(--bc-medium);
|
|
3
3
|
|
|
4
|
+
// CONTEXTUAL STYLES
|
|
4
5
|
a& {
|
|
5
6
|
text-decoration: none !important;
|
|
6
7
|
}
|
|
8
|
+
|
|
9
|
+
// VARIANTS
|
|
7
10
|
&&__muted {
|
|
8
11
|
--_ca-bc: var(--bc-light);
|
|
9
12
|
|
|
@@ -18,7 +21,7 @@
|
|
|
18
21
|
margin-bottom: 0;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
border:
|
|
24
|
+
border: var(--su-static1) solid var(--_ca-bc);
|
|
22
25
|
|
|
23
26
|
background-color: var(--white);
|
|
24
27
|
border-radius: var(--br-sm);
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
.s-empty-state {
|
|
2
|
-
|
|
3
|
-
text-align: center;
|
|
4
|
-
margin-left: auto;
|
|
5
|
-
margin-right: auto;
|
|
6
|
-
|
|
2
|
+
// CHILD ELEMENTS
|
|
7
3
|
p {
|
|
8
4
|
font-size: var(--fs-body1);
|
|
9
5
|
margin-bottom: var(--su12);
|
|
@@ -12,4 +8,9 @@
|
|
|
12
8
|
color: var(--fc-dark);
|
|
13
9
|
}
|
|
14
10
|
}
|
|
11
|
+
|
|
12
|
+
color: var(--fc-light);
|
|
13
|
+
text-align: center;
|
|
14
|
+
margin-left: auto;
|
|
15
|
+
margin-right: auto;
|
|
15
16
|
}
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
--_me-label-btc: var(--bc-light);
|
|
4
4
|
--_me-label-cursor: pointer;
|
|
5
5
|
|
|
6
|
+
// CONTEXTUAL STYLES
|
|
6
7
|
.dark-mode({
|
|
7
8
|
--_me-divider-bg: var(--bc-lightest);
|
|
8
9
|
--_me-label-btc: var(--bc-lightest);
|
|
9
10
|
});
|
|
10
11
|
|
|
12
|
+
// CHILD ELEMENTS
|
|
11
13
|
& &--divider {
|
|
12
14
|
background-color: var(--_me-divider-bg);
|
|
13
15
|
height: var(--su-static1);
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
// STATES
|
|
66
|
-
// Selected
|
|
67
66
|
&.is-selected {
|
|
68
67
|
--_na-item-bg: var(--theme-primary-color);
|
|
69
68
|
--_na-item-fc: var(--white);
|
|
@@ -92,7 +91,7 @@
|
|
|
92
91
|
padding-right: 2em;
|
|
93
92
|
}
|
|
94
93
|
|
|
95
|
-
//
|
|
94
|
+
// INTERACTION
|
|
96
95
|
&:hover,
|
|
97
96
|
&:active {
|
|
98
97
|
background-color: var(--_na-item-bg-hover);
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// PAGE TITLES
|
|
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
|
|
11
|
-
// ----------------------------------------------------------------------------
|
|
12
|
-
|
|
13
1
|
.s-page-title {
|
|
14
2
|
--_pt-ai: flex-end;
|
|
15
3
|
--_pt-fd: row;
|
|
@@ -46,7 +34,7 @@
|
|
|
46
34
|
font-weight: normal;
|
|
47
35
|
line-height: var(--lh-sm);
|
|
48
36
|
margin: 0;
|
|
49
|
-
margin-bottom: 0; // TODO: investigate why this exists. I assume it's so margin-bottom isn't
|
|
37
|
+
margin-bottom: 0; // TODO: investigate why this exists. I assume it's so margin-bottom isn't overridden, but 🤷♂️
|
|
50
38
|
}
|
|
51
39
|
.s-breadcrumbs {
|
|
52
40
|
margin-bottom: var(--_pt-breadcrums-mb);
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
--_pa-item-bg: transparent;
|
|
4
4
|
--_pa-item-bc: var(--bc-medium);
|
|
5
5
|
--_pa-item-fc: var(--fc-medium);
|
|
6
|
-
// hover
|
|
7
6
|
--_pa-item-bg-hover: var(--black-100);
|
|
8
7
|
--_pa-item-bc-hover: var(--bc-darker);
|
|
9
8
|
--_pa-item-fc-hover: var(--fc-dark);
|
|
10
9
|
|
|
10
|
+
// CONTEXTUAL STYLES
|
|
11
11
|
.highcontrast-mode({ text-decoration: none; });
|
|
12
12
|
|
|
13
13
|
// MODIFIERS
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// PROSE
|
|
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
|
|
11
|
-
// ----------------------------------------------------------------------------
|
|
12
|
-
|
|
13
1
|
.s-prose {
|
|
14
2
|
--s-prose-line-height: 1.5;
|
|
15
3
|
--s-prose-spacing: 1.1em;
|
|
@@ -23,6 +23,23 @@
|
|
|
23
23
|
text-decoration: none;
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
+
// STATES
|
|
27
|
+
&.is-selected {
|
|
28
|
+
&,
|
|
29
|
+
a&,
|
|
30
|
+
a&:active,
|
|
31
|
+
a&:hover,
|
|
32
|
+
a&:focus {
|
|
33
|
+
background-color: var(--_ta-bg-selected);
|
|
34
|
+
border-color: var(--_ta-bc-selected);
|
|
35
|
+
color: var(--_ta-fc-selected);
|
|
36
|
+
|
|
37
|
+
.highcontrast-mode({
|
|
38
|
+
border-color: currentColor;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
// MODIFIERS
|
|
27
44
|
// Sizes
|
|
28
45
|
&&__xs {
|
|
@@ -47,7 +64,10 @@
|
|
|
47
64
|
}
|
|
48
65
|
|
|
49
66
|
// VARIANTS
|
|
67
|
+
// NOTE: ignored and watched variants are used in core with the .post-tag class (in place of the base tag .s-tag)
|
|
68
|
+
&__ignored, // TODO: remove all single `&` ignored styles once core no longer requires them
|
|
50
69
|
&&__ignored,
|
|
70
|
+
&__watched, // TODO: remove all single `&` watched styles once core no longer requires them
|
|
51
71
|
&&__watched {
|
|
52
72
|
--_ta-pl: calc(var(--su-static24) - var(--su-static2)); // 22px
|
|
53
73
|
--_ta-before-size: calc(var(--su-static16) - var(--su-static2)); // 14px
|
|
@@ -71,6 +91,7 @@
|
|
|
71
91
|
}
|
|
72
92
|
position: relative;
|
|
73
93
|
}
|
|
94
|
+
&__ignored, // TODO: remove all single `&` ignored styles once core no longer requires them
|
|
74
95
|
&&__ignored {
|
|
75
96
|
--_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");
|
|
76
97
|
}
|
|
@@ -110,6 +131,7 @@
|
|
|
110
131
|
--_ta-bg-selected: var(--black-200);
|
|
111
132
|
--_ta-fc-selected: var(--black-900);
|
|
112
133
|
}
|
|
134
|
+
&__watched, // TODO: remove all single `&` watched styles once core no longer requires them
|
|
113
135
|
&&__watched {
|
|
114
136
|
--_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='M7.05 1C2.63 1 0 6.5 0 6.5S2.63 12 7.05 12C11.38 12 14 6.5 14 6.5S11.37 1 7.05 1ZM7 10.17A3.59 3.59 0 0 1 3.5 6.5 3.6 3.6 0 0 1 7 2.83c1.94 0 3.5 1.65 3.5 3.67A3.57 3.57 0 0 1 7 10.17Zm0-1.84c.97 0 1.75-.81 1.75-1.83S7.97 4.67 7 4.67s-1.75.81-1.75 1.83S6.03 8.33 7 8.33Z'/%3E%3C/svg%3E");
|
|
115
137
|
}
|
|
@@ -152,7 +174,6 @@
|
|
|
152
174
|
max-width: calc(var(--su-static16) + var(--su-static2));
|
|
153
175
|
}
|
|
154
176
|
|
|
155
|
-
|
|
156
177
|
// INTERACTION
|
|
157
178
|
a&:not(.is-selected) {
|
|
158
179
|
&:hover,
|
|
@@ -167,22 +188,6 @@
|
|
|
167
188
|
});
|
|
168
189
|
}
|
|
169
190
|
}
|
|
170
|
-
// Selected
|
|
171
|
-
&.is-selected {
|
|
172
|
-
&,
|
|
173
|
-
a&,
|
|
174
|
-
a&:active,
|
|
175
|
-
a&:hover,
|
|
176
|
-
a&:focus {
|
|
177
|
-
background-color: var(--_ta-bg-selected);
|
|
178
|
-
border-color: var(--_ta-bc-selected);
|
|
179
|
-
color: var(--_ta-fc-selected);
|
|
180
|
-
|
|
181
|
-
.highcontrast-mode({
|
|
182
|
-
border-color: currentColor;
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
191
|
|
|
187
192
|
background-color: var(--_ta-bg);
|
|
188
193
|
border: var(--su-static1) solid var(--_ta-bc);
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// FILE UPLOAD -- DYNAMIC PARTS
|
|
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
1
|
.s-uploader {
|
|
10
2
|
--_up-bg: var(--black-025);
|
|
11
3
|
--_up-bg-focus: var(--black-050);
|
|
12
4
|
--_up-bg-bc: var(--black-150);
|
|
13
5
|
--_up-focus-ring-color: var(--focus-ring);
|
|
14
|
-
// Static custom properties (not redefined but repeated enough to warrant a custom property)
|
|
15
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");
|
|
16
7
|
|
|
8
|
+
// CONTEXTUAL STYLES
|
|
17
9
|
.highcontrast-mode({ --_up-bg-bc-hc: var(--black-400); });
|
|
18
10
|
|
|
19
|
-
//
|
|
20
|
-
&.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
// STATES
|
|
12
|
+
&.has-error,
|
|
13
|
+
&.has-success,
|
|
14
|
+
&.has-warning {
|
|
15
|
+
.s-link {
|
|
16
|
+
color: var(--_up-link-fc);
|
|
17
|
+
}
|
|
26
18
|
}
|
|
27
19
|
&.has-error {
|
|
28
20
|
--_up-bg: var(--red-050);
|
|
@@ -48,21 +40,28 @@
|
|
|
48
40
|
--_up-focus-ring-color: var(--focus-ring-warning);
|
|
49
41
|
--_up-link-fc: var(--yellow-900);
|
|
50
42
|
}
|
|
51
|
-
&.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
&.is-active {
|
|
44
|
+
--_up-bg: var(--black-050);
|
|
45
|
+
--_up-bg-bc: var(--black-200);
|
|
46
|
+
}
|
|
47
|
+
&.is-disabled {
|
|
48
|
+
opacity: var(--_o-disabled-static);
|
|
57
49
|
}
|
|
58
50
|
|
|
51
|
+
|
|
59
52
|
// CHILD ELEMENTS
|
|
60
|
-
// This is for safari shadow DOM
|
|
61
|
-
// see https://github.com/StackExchange/Stacks/pull/690#issuecomment-861028193
|
|
62
|
-
input[type="file"]::file-selector-button {
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
}
|
|
65
53
|
& &--container {
|
|
54
|
+
&:before { // Add the dashed border as an SVG background mask
|
|
55
|
+
-webkit-mask-image: var(--_up-bg-b-image);
|
|
56
|
+
mask-image: var(--_up-bg-b-image);
|
|
57
|
+
background-color: var(--_up-bg-bc-hc-state, var(--_up-bg-bc-hc, var(--_up-bg-bc)));
|
|
58
|
+
content: '';
|
|
59
|
+
border-radius: var(--br-lg);
|
|
60
|
+
display: block;
|
|
61
|
+
position: absolute;
|
|
62
|
+
inset: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
66
65
|
align-items: center;
|
|
67
66
|
background-color: var(--_up-bg);
|
|
68
67
|
border-radius: var(--br-lg);
|
|
@@ -73,20 +72,13 @@
|
|
|
73
72
|
padding: var(--su8) var(--su16);
|
|
74
73
|
position: relative;
|
|
75
74
|
text-align: center;
|
|
76
|
-
|
|
77
|
-
// Add the dashed border as an SVG background mask
|
|
78
|
-
&:before {
|
|
79
|
-
-webkit-mask-image: var(--_up-bg-b-image);
|
|
80
|
-
mask-image: var(--_up-bg-b-image);
|
|
81
|
-
background-color: var(--_up-bg-bc-hc-state, var(--_up-bg-bc-hc, var(--_up-bg-bc)));
|
|
82
|
-
content: '';
|
|
83
|
-
border-radius: var(--br-lg);
|
|
84
|
-
display: block;
|
|
85
|
-
position: absolute;
|
|
86
|
-
inset: 0;
|
|
87
|
-
}
|
|
88
75
|
}
|
|
89
76
|
& &--input {
|
|
77
|
+
&:focus:focus-visible + .s-uploader--container {
|
|
78
|
+
background-color: var(--_up-bg-focus);
|
|
79
|
+
box-shadow: 0 0 0 var(--su-static4) var(--_up-focus-ring-color);
|
|
80
|
+
}
|
|
81
|
+
|
|
90
82
|
cursor: pointer;
|
|
91
83
|
height: 100%;
|
|
92
84
|
inset: 0;
|
|
@@ -94,26 +86,12 @@
|
|
|
94
86
|
position: absolute;
|
|
95
87
|
width: 100%;
|
|
96
88
|
z-index: var(--zi-selected);
|
|
97
|
-
|
|
98
|
-
&:focus:focus-visible + .s-uploader--container {
|
|
99
|
-
background-color: var(--_up-bg-focus);
|
|
100
|
-
box-shadow: 0 0 0 var(--su-static4) var(--_up-focus-ring-color);
|
|
101
|
-
}
|
|
102
89
|
}
|
|
103
90
|
& &--preview {
|
|
104
91
|
max-width: 100%;
|
|
105
92
|
pointer-events: none;
|
|
106
93
|
}
|
|
107
94
|
& &--preview-thumbnail {
|
|
108
|
-
background-color: var(--white);
|
|
109
|
-
border-radius: var(--br-sm);
|
|
110
|
-
box-shadow: var(--bs-md);
|
|
111
|
-
max-height: var(--su-static128);
|
|
112
|
-
max-width: 100%;
|
|
113
|
-
overflow: hidden;
|
|
114
|
-
text-overflow: ellipsis;
|
|
115
|
-
white-space: nowrap;
|
|
116
|
-
|
|
117
95
|
.highcontrast-mode({ border: 1px solid var(--black); });
|
|
118
96
|
|
|
119
97
|
&:is(img) {
|
|
@@ -124,11 +102,17 @@
|
|
|
124
102
|
&:not(img) {
|
|
125
103
|
padding: var(--su16);
|
|
126
104
|
}
|
|
105
|
+
|
|
106
|
+
background-color: var(--white);
|
|
107
|
+
border-radius: var(--br-sm);
|
|
108
|
+
box-shadow: var(--bs-md);
|
|
109
|
+
max-height: var(--su-static128);
|
|
110
|
+
max-width: 100%;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
text-overflow: ellipsis;
|
|
113
|
+
white-space: nowrap;
|
|
127
114
|
}
|
|
128
115
|
& &--previews {
|
|
129
|
-
max-width: 100%;
|
|
130
|
-
text-align: left;
|
|
131
|
-
|
|
132
116
|
&.has-multiple {
|
|
133
117
|
display: block;
|
|
134
118
|
height: auto;
|
|
@@ -151,7 +135,6 @@
|
|
|
151
135
|
white-space: nowrap;
|
|
152
136
|
}
|
|
153
137
|
}
|
|
154
|
-
|
|
155
138
|
.s-uploader--preview-thumbnail {
|
|
156
139
|
color: transparent;
|
|
157
140
|
height: var(--su-static32);
|
|
@@ -168,6 +151,9 @@
|
|
|
168
151
|
}
|
|
169
152
|
}
|
|
170
153
|
}
|
|
154
|
+
|
|
155
|
+
max-width: 100%;
|
|
156
|
+
text-align: left;
|
|
171
157
|
}
|
|
172
158
|
& &--previews-heading {
|
|
173
159
|
color: var(--black-900);
|
|
@@ -181,6 +167,11 @@
|
|
|
181
167
|
top: var(--su8);
|
|
182
168
|
z-index: var(--zi-active);
|
|
183
169
|
}
|
|
170
|
+
// This is for safari shadow DOM
|
|
171
|
+
// see https://github.com/StackExchange/Stacks/pull/690#issuecomment-861028193
|
|
172
|
+
input[type="file"]::file-selector-button {
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
}
|
|
184
175
|
|
|
185
176
|
position: relative;
|
|
186
177
|
}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/StackExchange/Stacks.git"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.4.
|
|
8
|
+
"version": "1.4.2",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
11
|
"lib"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@11ty/eleventy": "^1.0.2",
|
|
38
38
|
"@highlightjs/cdn-assets": "^11.6.0",
|
|
39
|
-
"@stackoverflow/stacks-editor": "^0.8.
|
|
39
|
+
"@stackoverflow/stacks-editor": "^0.8.2",
|
|
40
40
|
"@stackoverflow/stacks-icons": "^3.1.0",
|
|
41
41
|
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
|
42
42
|
"@typescript-eslint/parser": "^5.40.0",
|