@stackoverflow/stacks 1.4.2 → 1.6.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.
- package/dist/css/stacks.css +3565 -2093
- package/dist/css/stacks.min.css +1 -1
- package/lib/css/atomic/colors.less +1 -1
- package/lib/css/atomic/flex.less +53 -2
- package/lib/css/components/activity-indicator.less +3 -3
- package/lib/css/components/badges.less +11 -11
- package/lib/css/components/button-groups.less +59 -83
- package/lib/css/components/buttons.less +384 -585
- package/lib/css/components/code-blocks.less +98 -125
- package/lib/css/components/expandable.less +69 -59
- package/lib/css/components/inputs.less +38 -24
- package/lib/css/components/link-previews.less +110 -122
- package/lib/css/components/links.less +0 -16
- package/lib/css/components/modals.less +95 -120
- package/lib/css/components/notices.less +187 -180
- package/lib/css/components/popovers.less +132 -181
- package/lib/css/components/post-summary.less +0 -9
- package/lib/css/components/progress-bars.less +236 -297
- package/lib/css/components/prose.less +293 -380
- package/lib/css/components/sidebar-widgets.less +251 -0
- package/lib/css/components/spinner.less +54 -104
- package/lib/css/components/tables.less +0 -24
- package/lib/css/components/toggle-switches.less +69 -120
- package/lib/css/components/topbar.less +10 -11
- package/lib/css/components/user-cards.less +91 -144
- package/lib/css/stacks-dynamic.less +0 -1
- package/lib/css/stacks-static.less +1 -1
- package/package.json +11 -11
- package/lib/css/components/_styles-template.less +0 -78
- package/lib/css/components/widget-dynamic.less +0 -33
- package/lib/css/components/widget-static.less +0 -274
|
@@ -1,197 +1,148 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// POPOVERS
|
|
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
|
-
// TABLE OF CONTENTS
|
|
10
|
-
// • VARIABLES
|
|
11
|
-
// • BASE STYLE
|
|
12
|
-
// • ARROWS
|
|
13
|
-
// • LOCATIONS
|
|
14
|
-
//
|
|
15
|
-
// ============================================================================
|
|
16
|
-
// $ BASE STYLES
|
|
17
|
-
// ----------------------------------------------------------------------------
|
|
18
1
|
.s-popover {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
2
|
+
--_po-bg: var(--white);
|
|
3
|
+
--_po-bc: var(--bc-medium);
|
|
4
|
+
--_po-bs: var(--bs-md);
|
|
5
|
+
--_po-d: none;
|
|
6
|
+
--_po-wmn: 12rem;
|
|
7
|
+
--_po-w: 100%;
|
|
8
|
+
// arrow
|
|
9
|
+
--_po-arrow-fc: var(--white);
|
|
10
|
+
--_po-arrow-b: unset;
|
|
11
|
+
--_po-arrow-l: unset;
|
|
12
|
+
--_po-arrow-r: unset;
|
|
13
|
+
--_po-arrow-t: unset;
|
|
14
|
+
--_po-arrow-ps: calc(var(--su6) * -1); // ps suffix used for placement, not positioning value
|
|
15
|
+
--_po-arrow-after-b: unset;
|
|
16
|
+
--_po-arrow-after-l: unset;
|
|
17
|
+
--_po-arrow-after-r: unset;
|
|
18
|
+
--_po-arrow-after-t: unset;
|
|
19
|
+
--_po-arrow-after-bs: unset;
|
|
20
|
+
|
|
21
|
+
// CONTEXTUAL STYLES
|
|
37
22
|
.dark-mode({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
23
|
+
--_po-bg: var(--black-075);
|
|
24
|
+
--_po-bc: var(--bc-light);
|
|
25
|
+
--_po-bs: var(--bs-lg);
|
|
26
|
+
--_po-arrow-fc: var(--black-075);
|
|
41
27
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
width: auto;
|
|
45
|
-
min-width: unset;
|
|
46
|
-
}
|
|
47
|
-
|
|
28
|
+
|
|
29
|
+
// MODIFIERS
|
|
48
30
|
&.is-visible {
|
|
49
|
-
|
|
31
|
+
--_po-d: block;
|
|
50
32
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
.s-popover--arrow__bl,
|
|
55
|
-
.s-popover--arrow__br {
|
|
56
|
-
bottom: calc(var(--su6) * -1);
|
|
57
|
-
|
|
58
|
-
&:after {
|
|
59
|
-
bottom: 1px;
|
|
60
|
-
box-shadow: 2px 2px 5px 0 hsla(0, 0, 0, 0.07), 2px 2px 2px -1px hsla(0, 0, 0, 0.1);
|
|
61
|
-
|
|
62
|
-
.highcontrast-mode({
|
|
63
|
-
box-shadow: 1px 1px 0 0 var(--bc-medium);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
33
|
+
&&__tooltip {
|
|
34
|
+
--_po-wmn: unset;
|
|
35
|
+
--_po-w: auto;
|
|
66
36
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.highcontrast-mode({
|
|
79
|
-
box-shadow: -1px -1px 0 0 var(--bc-medium);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
37
|
+
|
|
38
|
+
// CHILD ELEMENTS
|
|
39
|
+
// Arrow
|
|
40
|
+
&[data-popper-placement^="top"] > &--arrow,
|
|
41
|
+
& &--arrow__bc,
|
|
42
|
+
& &--arrow__bl,
|
|
43
|
+
& &--arrow__br {
|
|
44
|
+
--_po-arrow-b: var(--_po-arrow-ps);
|
|
45
|
+
--_po-arrow-after-b: var(--su-static1);
|
|
46
|
+
--_po-arrow-after-bs: 2px 2px 5px 0 hsla(0, 0%, 0%, 0.07), 2px 2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
47
|
+
.highcontrast-mode({ --_po-arrow-after-bs: 1px 1px 0 0 var(--bc-medium); });
|
|
82
48
|
}
|
|
83
|
-
|
|
84
|
-
&
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
right: 1px;
|
|
92
|
-
box-shadow: 2px -2px 5px 0 hsla(0, 0, 0, 0.07), 2px -2px 2px -1px hsla(0, 0, 0, 0.1);
|
|
93
|
-
|
|
94
|
-
.highcontrast-mode({
|
|
95
|
-
box-shadow: 1px -1px 0 0 var(--bc-medium);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
49
|
+
&[data-popper-placement^="bottom"] > &--arrow,
|
|
50
|
+
& &--arrow__tc,
|
|
51
|
+
& &--arrow__tl,
|
|
52
|
+
& &--arrow__tr {
|
|
53
|
+
--_po-arrow-t: var(--_po-arrow-ps);
|
|
54
|
+
--_po-arrow-after-t: var(--su-static1);
|
|
55
|
+
--_po-arrow-after-bs: -1px -1px 1px 0 hsla(0, 0%, 0%, 0.12);
|
|
56
|
+
.highcontrast-mode({ --_po-arrow-after-bs: -1px -1px 0 0 var(--bc-medium); });
|
|
98
57
|
}
|
|
99
|
-
|
|
100
|
-
&
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
left: 1px;
|
|
108
|
-
box-shadow: -2px 2px 5px 0 hsla(0, 0, 0, 0.07), -2px 2px 2px -1px hsla(0, 0, 0, 0.1);
|
|
109
|
-
|
|
110
|
-
.highcontrast-mode({
|
|
111
|
-
box-shadow: -1px 1px 0 0 var(--bc-medium);
|
|
112
|
-
});
|
|
113
|
-
}
|
|
58
|
+
&[data-popper-placement^="left"] > &--arrow,
|
|
59
|
+
& &--arrow__rc,
|
|
60
|
+
& &--arrow__rt,
|
|
61
|
+
& &--arrow__rb {
|
|
62
|
+
--_po-arrow-r: var(--_po-arrow-ps);
|
|
63
|
+
--_po-arrow-after-r: var(--su-static1);
|
|
64
|
+
--_po-arrow-after-bs: 2px -2px 5px 0 hsla(0, 0%, 0%, 0.07), 2px -2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
65
|
+
.highcontrast-mode({ --_po-arrow-after-bs: 1px -1px 0 0 var(--bc-medium); });
|
|
114
66
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
67
|
+
&[data-popper-placement^="right"] > &--arrow,
|
|
68
|
+
& &--arrow__lc,
|
|
69
|
+
& &--arrow__lt,
|
|
70
|
+
& &--arrow__lb {
|
|
71
|
+
--_po-arrow-l: var(--_po-arrow-ps);
|
|
72
|
+
--_po-arrow-after-l: var(--su-static1);
|
|
73
|
+
--_po-arrow-after-bs: -2px 2px 5px 0 hsla(0, 0%, 0%, 0.07), -2px 2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
74
|
+
.highcontrast-mode({ --_po-arrow-after-bs: -1px 1px 0 0 var(--bc-medium); });
|
|
119
75
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
top: calc(50% - var(--su6));
|
|
76
|
+
& &--arrow__tc,
|
|
77
|
+
& &--arrow__bc {
|
|
78
|
+
--_po-arrow-l: calc(50% - var(--su6));
|
|
124
79
|
}
|
|
125
|
-
|
|
126
|
-
|
|
80
|
+
& &--arrow__lc,
|
|
81
|
+
& &--arrow__rc {
|
|
82
|
+
--_po-arrow-t: calc(50% - var(--su6));
|
|
83
|
+
}
|
|
84
|
+
& &--arrow__tr,
|
|
127
85
|
.s-popover--arrow__br {
|
|
128
|
-
|
|
86
|
+
--_po-arrow-r: var(--su12);
|
|
129
87
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
bottom: var(--su12);
|
|
88
|
+
& &--arrow__rb,
|
|
89
|
+
& &--arrow__lb {
|
|
90
|
+
--_po-arrow-b: var(--su12);
|
|
134
91
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
// • LEFT & RIGHT DIRECTIONS (Top, Center, Bottom)
|
|
161
|
-
//
|
|
162
|
-
// ============================================================================
|
|
163
|
-
// $ BASE STYLE
|
|
164
|
-
// Sets the base arrow style for tooltips, popovers, and dropdowns.
|
|
165
|
-
// ----------------------------------------------------------------------------
|
|
92
|
+
& &--arrow {
|
|
93
|
+
&,
|
|
94
|
+
&:before,
|
|
95
|
+
&:after {
|
|
96
|
+
display: block;
|
|
97
|
+
height: var(--su12);
|
|
98
|
+
position: absolute;
|
|
99
|
+
width: var(--su12);
|
|
100
|
+
z-index: -1;
|
|
101
|
+
}
|
|
102
|
+
&:before, // This renders our border
|
|
103
|
+
&:after {
|
|
104
|
+
content: '';
|
|
105
|
+
transform: rotate(45deg);
|
|
106
|
+
}
|
|
107
|
+
&:after { // This renders our foreground color
|
|
108
|
+
bottom: var(--_po-arrow-after-b);
|
|
109
|
+
box-shadow: var(--_po-arrow-after-bs);
|
|
110
|
+
left: var(--_po-arrow-after-l);
|
|
111
|
+
right: var(--_po-arrow-after-r);
|
|
112
|
+
top: var(--_po-arrow-after-t);
|
|
113
|
+
|
|
114
|
+
background: currentColor;
|
|
115
|
+
border-radius: calc(var(--su-static1) * 1.5);
|
|
116
|
+
}
|
|
166
117
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
118
|
+
bottom: var(--_po-arrow-b);
|
|
119
|
+
color: var(--_po-arrow-fc);
|
|
120
|
+
left: var(--_po-arrow-l);
|
|
121
|
+
right: var(--_po-arrow-r);
|
|
122
|
+
top: var(--_po-arrow-t);
|
|
123
|
+
}
|
|
124
|
+
// Close btn
|
|
125
|
+
& &--close {
|
|
126
|
+
float: right; // Use floats for title wrapping
|
|
127
|
+
top: calc(var(--su8) * -1); // Compensate for s-popover's padding
|
|
128
|
+
right: calc(var(--su8) * -1); // Compensate for s-popover's padding
|
|
129
|
+
padding: var(--su8) !important;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
background-color: var(--_po-bg);
|
|
133
|
+
border: 1px solid var(--_po-bc);
|
|
134
|
+
box-shadow: var(--_po-bs);
|
|
135
|
+
display: var(--_po-d);
|
|
136
|
+
min-width: var(--_po-wmn);
|
|
137
|
+
width: var(--_po-w);
|
|
138
|
+
|
|
139
|
+
border-radius: var(--br-md);
|
|
140
|
+
color: var(--fc-dark);
|
|
141
|
+
font-size: var(--fs-body1);
|
|
142
|
+
max-width: 24rem;
|
|
143
|
+
padding: var(--su12);
|
|
170
144
|
position: absolute;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.s-popover--arrow {
|
|
178
|
-
color: var(--white);
|
|
179
|
-
|
|
180
|
-
.dark-mode({
|
|
181
|
-
color: var(--black-075);
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.s-popover--arrow:before {
|
|
186
|
-
// This renders our border
|
|
187
|
-
content: '';
|
|
188
|
-
transform: rotate(45deg);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.s-popover--arrow:after {
|
|
192
|
-
// This renders our foreground color
|
|
193
|
-
content: '';
|
|
194
|
-
transform: rotate(45deg);
|
|
195
|
-
border-radius: 1.5px;
|
|
196
|
-
background: currentColor;
|
|
197
|
-
}
|
|
145
|
+
white-space: normal; // Guard against popovers being in a container with white-space: nowrap. Without this, the content pops *out* of the popover.
|
|
146
|
+
z-index: var(--zi-popovers);
|
|
147
|
+
}
|
|
148
|
+
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// POST SUMMARY
|
|
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
1
|
.s-post-summary {
|
|
11
2
|
position: relative;
|
|
12
3
|
display: flex;
|