@stackoverflow/stacks 1.6.5 → 1.6.7
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/README.md +47 -2
- package/dist/css/stacks.css +157 -158
- package/dist/css/stacks.min.css +1 -1
- package/lib/css/components/activity-indicator.less +9 -5
- package/lib/css/components/avatars.less +14 -5
- package/lib/css/components/award-bling.less +2 -0
- package/lib/css/components/badges.less +25 -3
- package/lib/css/components/breadcrumbs.less +9 -5
- package/lib/css/components/button-groups.less +3 -0
- package/lib/css/components/buttons.less +35 -6
- package/lib/css/components/code-blocks.less +13 -0
- package/lib/css/components/empty-states.less +3 -3
- package/lib/css/components/expandable.less +61 -59
- package/lib/css/components/labels.less +12 -4
- package/lib/css/components/link-previews.less +19 -4
- package/lib/css/components/menu.less +4 -1
- package/lib/css/components/modals.less +5 -0
- package/lib/css/components/navigation.less +38 -46
- package/lib/css/components/notices.less +28 -7
- package/lib/css/components/pagination.less +2 -2
- package/lib/css/components/progress-bars.less +27 -5
- package/lib/css/components/prose.less +64 -22
- package/lib/css/components/sidebar-widgets.less +75 -67
- package/lib/css/components/spinner.less +21 -13
- package/lib/css/components/tags.less +21 -16
- package/lib/css/components/toggle-switches.less +12 -4
- package/lib/css/components/uploader.less +34 -16
- package/lib/css/components/user-cards.less +10 -1
- package/lib/test/s-tooltip.test.ts +62 -0
- package/lib/test/s-tooltip.visual.test.ts +31 -0
- package/package.json +30 -14
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.construct-notice-component(@baseClass) {
|
|
2
|
-
// BASE COMPONENT-SPECIFIC CUSTOM PROPERTIES
|
|
3
2
|
--_no-bc: var(--bc-medium);
|
|
4
3
|
--_no-bg: var(--black-050);
|
|
5
4
|
--_no-fc: var(--fc-medium);
|
|
@@ -11,13 +10,16 @@
|
|
|
11
10
|
.dark-mode({
|
|
12
11
|
--_no-bc: var(--_no-bg);
|
|
13
12
|
});
|
|
13
|
+
|
|
14
14
|
.highcontrast-mode({
|
|
15
15
|
--_no-bc: currentColor;
|
|
16
16
|
});
|
|
17
|
+
|
|
17
18
|
.highcontrast-dark-mode({
|
|
18
19
|
--_no-bc: currentColor;
|
|
19
20
|
});
|
|
20
21
|
}
|
|
22
|
+
|
|
21
23
|
&__important {
|
|
22
24
|
--_no-bc: var(--_no-bg);
|
|
23
25
|
--_no-bg: var(--black-700);
|
|
@@ -42,6 +44,7 @@
|
|
|
42
44
|
--_no-bg: var(--red-200);
|
|
43
45
|
});
|
|
44
46
|
}
|
|
47
|
+
|
|
45
48
|
&.@{baseClass}__important {
|
|
46
49
|
--_no-bc: var(--_no-bg);
|
|
47
50
|
--_no-bg: var(--red-500);
|
|
@@ -52,12 +55,14 @@
|
|
|
52
55
|
--_no-bg: var(--red-400);
|
|
53
56
|
--_no-fc: var(--black-900);
|
|
54
57
|
});
|
|
58
|
+
|
|
55
59
|
.highcontrast-dark-mode({
|
|
56
60
|
--_no-bg: var(--red-500);
|
|
57
61
|
--_no-fc: var(--white);
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
}
|
|
65
|
+
|
|
61
66
|
&__info {
|
|
62
67
|
--_no-bc: var(--theme-secondary-150);
|
|
63
68
|
--_no-bg: var(--theme-secondary-050);
|
|
@@ -69,10 +74,12 @@
|
|
|
69
74
|
.highcontrast-mode({
|
|
70
75
|
--_no-bg: var(--theme-secondary-100);
|
|
71
76
|
});
|
|
77
|
+
|
|
72
78
|
.highcontrast-dark-mode({
|
|
73
79
|
--_no-bg: var(--theme-secondary-100);
|
|
74
80
|
});
|
|
75
81
|
}
|
|
82
|
+
|
|
76
83
|
&.@{baseClass}__important {
|
|
77
84
|
--_no-bc: var(--_no-bg);
|
|
78
85
|
--_no-bg: var(--theme-secondary-400);
|
|
@@ -83,12 +90,14 @@
|
|
|
83
90
|
--_no-bg: var(--theme-secondary-300);
|
|
84
91
|
--_no-fc: var(--black-900);
|
|
85
92
|
});
|
|
93
|
+
|
|
86
94
|
.highcontrast-dark-mode({
|
|
87
95
|
--_no-bg: var(--theme-secondary-400);
|
|
88
96
|
--_no-fc: var(--white);
|
|
89
97
|
});
|
|
90
98
|
}
|
|
91
99
|
}
|
|
100
|
+
|
|
92
101
|
&__success {
|
|
93
102
|
--_no-bc: var(--green-200);
|
|
94
103
|
--_no-bg: var(--green-050);
|
|
@@ -100,6 +109,7 @@
|
|
|
100
109
|
--_no-bg: var(--green-200);
|
|
101
110
|
});
|
|
102
111
|
}
|
|
112
|
+
|
|
103
113
|
&.@{baseClass}__important {
|
|
104
114
|
--_no-bc: var(--_no-bg);
|
|
105
115
|
--_no-bg: var(--green-400);
|
|
@@ -111,12 +121,14 @@
|
|
|
111
121
|
--_no-bg: var(--green-500);
|
|
112
122
|
--_no-fc: var(--white);
|
|
113
123
|
});
|
|
124
|
+
|
|
114
125
|
.highcontrast-mode({
|
|
115
126
|
--_no-bg: var(--green-500);
|
|
116
127
|
--_no-fc: var(--white);
|
|
117
128
|
});
|
|
118
129
|
}
|
|
119
130
|
}
|
|
131
|
+
|
|
120
132
|
&__warning {
|
|
121
133
|
--_no-bc: var(--yellow-300);
|
|
122
134
|
--_no-bg: var(--yellow-050);
|
|
@@ -129,6 +141,7 @@
|
|
|
129
141
|
--_no-bg: var(--yellow-200);
|
|
130
142
|
});
|
|
131
143
|
}
|
|
144
|
+
|
|
132
145
|
&.@{baseClass}__important {
|
|
133
146
|
--_no-bc: var(--_no-bg);
|
|
134
147
|
--_no-bg: var(--yellow-400);
|
|
@@ -140,6 +153,7 @@
|
|
|
140
153
|
--_no-bg: var(--yellow-600);
|
|
141
154
|
--_no-fc: var(--white);
|
|
142
155
|
});
|
|
156
|
+
|
|
143
157
|
.highcontrast-mode({
|
|
144
158
|
--_no-bg: var(--yellow-700);
|
|
145
159
|
--_no-fc: var(--white);
|
|
@@ -151,18 +165,21 @@
|
|
|
151
165
|
code {
|
|
152
166
|
background: var(--_no-code-bg, transparent);
|
|
153
167
|
}
|
|
168
|
+
|
|
154
169
|
& &--btn {
|
|
155
170
|
// TODO: decouple .s-notice--btn from .s-btn
|
|
156
171
|
&:not(:focus) {
|
|
157
172
|
box-shadow: none; // This will prevent default .s-btn box-shadow from showing
|
|
158
173
|
}
|
|
174
|
+
|
|
175
|
+
&:active {
|
|
176
|
+
background: var(--_no-btn-bg-active);
|
|
177
|
+
}
|
|
178
|
+
|
|
159
179
|
&:focus,
|
|
160
180
|
&:hover {
|
|
161
181
|
background: var(--_no-btn-bg-focus);
|
|
162
182
|
}
|
|
163
|
-
&:active {
|
|
164
|
-
background: var(--_no-btn-bg-active);
|
|
165
|
-
}
|
|
166
183
|
|
|
167
184
|
color: inherit;
|
|
168
185
|
padding: var(--su8);
|
|
@@ -189,17 +206,21 @@
|
|
|
189
206
|
opacity: 0;
|
|
190
207
|
visibility: hidden;
|
|
191
208
|
}
|
|
209
|
+
|
|
192
210
|
&[aria-hidden="false"] {
|
|
193
211
|
--_no-x-offset: calc(var(--su48) + var(--su1)); // 49px
|
|
194
212
|
opacity: 1;
|
|
195
213
|
visibility: visible;
|
|
196
214
|
}
|
|
215
|
+
|
|
197
216
|
&.is-pinned { // If you want to put the banner above the topbar
|
|
198
217
|
z-index: calc(var(--zi-navigation-fixed) + 1);
|
|
199
218
|
}
|
|
219
|
+
|
|
200
220
|
&__body-pt {
|
|
201
221
|
padding-top: 93px;
|
|
202
222
|
}
|
|
223
|
+
|
|
203
224
|
& &--container { // When we want to keep hero content capped
|
|
204
225
|
margin: 0 auto;
|
|
205
226
|
max-width: calc(var(--s-step) * 10);
|
|
@@ -207,13 +228,12 @@
|
|
|
207
228
|
width: 100%;
|
|
208
229
|
}
|
|
209
230
|
|
|
210
|
-
-webkit-transform: translate3d(0, var(--_no-x-offset), 0);
|
|
211
|
-
transform: translate3d(0, var(--_no-x-offset), 0);
|
|
212
|
-
|
|
213
231
|
border-width: var(--su-static1) 0;
|
|
214
232
|
inset: 0 0 auto 0;
|
|
215
233
|
padding: var(--su12);
|
|
216
234
|
position: fixed;
|
|
235
|
+
-webkit-transform: translate3d(0, var(--_no-x-offset), 0);
|
|
236
|
+
transform: translate3d(0, var(--_no-x-offset), 0);
|
|
217
237
|
width: 100%;
|
|
218
238
|
z-index: calc(var(--zi-navigation-fixed) - 1); // Tuck below topbar
|
|
219
239
|
}
|
|
@@ -232,6 +252,7 @@
|
|
|
232
252
|
@media (prefers-reduced-motion) {
|
|
233
253
|
transform: none !important;
|
|
234
254
|
}
|
|
255
|
+
|
|
235
256
|
&[aria-hidden="false"] {
|
|
236
257
|
opacity: 1;
|
|
237
258
|
transform: translate3d(0, 0, 0);
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
--_pa-item-bc: transparent;
|
|
17
17
|
--_pa-item-fc: var(--white);
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
&.s-pagination--item__clear {
|
|
20
20
|
--_pa-item-bg: transparent;
|
|
21
21
|
--_pa-item-bc: transparent;
|
|
22
22
|
--_pa-item-fc: inherit;
|
|
23
23
|
}
|
|
24
24
|
// override hover styles to match base styles
|
|
25
25
|
&.is-selected,
|
|
26
|
-
|
|
26
|
+
&.s-pagination--item__clear {
|
|
27
27
|
--_pa-item-bc-hover: var(--_pa-item-bc);
|
|
28
28
|
--_pa-item-bg-hover: var(--_pa-item-bg);
|
|
29
29
|
--_pa-item-fc-hover: var(--_pa-item-fc);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
.s-progress {
|
|
2
|
-
//
|
|
2
|
+
// COMPONENT-SPECIFIC CONSTANTS
|
|
3
|
+
@pr-circle-circumference: (2 * pi() * 14); // 2πr, r = 14.
|
|
4
|
+
// COMPONENT-SPECIFIC CUSTOM PROPERTIES
|
|
3
5
|
--_pr-bar: var(--br-sm);
|
|
4
6
|
--_pr-bg: var(--black-200);
|
|
5
7
|
--_pr-h: unset;
|
|
@@ -20,17 +22,21 @@
|
|
|
20
22
|
&&__brand {
|
|
21
23
|
--_pr-bar-bg: var(--orange-500);
|
|
22
24
|
}
|
|
25
|
+
|
|
23
26
|
&&__bronze {
|
|
24
27
|
--_pr-bar-bg: var(--bronze-lighter);
|
|
25
28
|
--_pr-label-bc: var(--bronze-darker);
|
|
26
29
|
}
|
|
30
|
+
|
|
27
31
|
&&__gold {
|
|
28
32
|
--_pr-bar-bg: var(--gold-lighter);
|
|
29
33
|
--_pr-label-bc: var(--gold-darker);
|
|
30
34
|
}
|
|
35
|
+
|
|
31
36
|
&&__info {
|
|
32
37
|
--_pr-bar-bg: var(--blue-500);
|
|
33
38
|
}
|
|
39
|
+
|
|
34
40
|
&&__silver {
|
|
35
41
|
--_pr-bar-bg: var(--silver-lighter);
|
|
36
42
|
--_pr-label-bc: var(--silver-darker);
|
|
@@ -47,6 +53,7 @@
|
|
|
47
53
|
--_pr-label-d: flex;
|
|
48
54
|
--_pr-label-g: var(--su4);
|
|
49
55
|
}
|
|
56
|
+
|
|
50
57
|
&&__badge {
|
|
51
58
|
--_pr-label-ai: center;
|
|
52
59
|
--_pr-label-px: 1em;
|
|
@@ -58,23 +65,26 @@
|
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
}
|
|
68
|
+
|
|
61
69
|
&&__circular {
|
|
62
70
|
--_pr-bg: transparent;
|
|
63
71
|
--_pr-size: var(--su-static32);
|
|
64
72
|
--s-progress-value: 0;
|
|
65
|
-
@s-progress-circle-circumference: (2 * pi() * 14); // 2πr, r = 14.
|
|
66
73
|
|
|
67
74
|
&.s-progress {
|
|
68
75
|
&__sm {
|
|
69
76
|
--_pr-size: var(--su-static24);
|
|
70
77
|
}
|
|
78
|
+
|
|
71
79
|
&__md {
|
|
72
80
|
--_pr-size: var(--su-static48);
|
|
73
81
|
}
|
|
82
|
+
|
|
74
83
|
&__lg {
|
|
75
84
|
--_pr-size: var(--su-static64);
|
|
76
85
|
}
|
|
77
86
|
}
|
|
87
|
+
|
|
78
88
|
// TODO: consider renaming to `.s-progress--bar`
|
|
79
89
|
.s-progress-bar { // It may necessitate wrapping element in a `&:not(&__circular)`
|
|
80
90
|
circle {
|
|
@@ -84,8 +94,8 @@
|
|
|
84
94
|
}
|
|
85
95
|
&:nth-of-type(2) {
|
|
86
96
|
stroke: currentColor;
|
|
87
|
-
stroke-dasharray: @
|
|
88
|
-
stroke-dashoffset: calc(((1 - var(--s-progress-value)) * @
|
|
97
|
+
stroke-dasharray: @pr-circle-circumference; // [1]
|
|
98
|
+
stroke-dashoffset: calc(((1 - var(--s-progress-value)) * @pr-circle-circumference) * 1px); // Multiply everything by 1px since Safari and Firefox require these to be in pixels
|
|
89
99
|
}
|
|
90
100
|
|
|
91
101
|
fill: none;
|
|
@@ -96,6 +106,7 @@
|
|
|
96
106
|
transform: rotate(270deg); // Make everything originate from the top of the circle
|
|
97
107
|
}
|
|
98
108
|
}
|
|
109
|
+
|
|
99
110
|
&&__privilege {
|
|
100
111
|
--_pr-bar-bg: var(--green-050);
|
|
101
112
|
--_pr-label-ai: center;
|
|
@@ -104,6 +115,7 @@
|
|
|
104
115
|
|
|
105
116
|
.highcontrast-mode({ --_pr-bar-bg: var(--green-200); });
|
|
106
117
|
}
|
|
118
|
+
|
|
107
119
|
// TODO move `.s-progress__stepped` to entirely separate component (or consider deprecating)
|
|
108
120
|
&&__stepped { // There's so little overlap with the base .s-progress that it doesn't make sense as a variant
|
|
109
121
|
background: transparent;
|
|
@@ -116,6 +128,7 @@
|
|
|
116
128
|
left: 0;
|
|
117
129
|
right: 50%;
|
|
118
130
|
}
|
|
131
|
+
|
|
119
132
|
&__right {
|
|
120
133
|
left: 50%;
|
|
121
134
|
right: 0;
|
|
@@ -129,6 +142,7 @@
|
|
|
129
142
|
top: calc(var(--su-static8) + var(--su-static1));
|
|
130
143
|
z-index: var(--zi-base);
|
|
131
144
|
}
|
|
145
|
+
|
|
132
146
|
&--label { // Override a ton of properties
|
|
133
147
|
border: 0;
|
|
134
148
|
border-radius: 0;
|
|
@@ -142,27 +156,32 @@
|
|
|
142
156
|
width: auto;
|
|
143
157
|
z-index: var(--zi-base);
|
|
144
158
|
}
|
|
159
|
+
|
|
145
160
|
&--step {
|
|
146
161
|
&.is-active {
|
|
147
162
|
.s-progress {
|
|
148
163
|
&--bar.s-progress--bar__left {
|
|
149
164
|
background: var(--theme-secondary-400);
|
|
150
165
|
}
|
|
166
|
+
|
|
151
167
|
&--label {
|
|
152
168
|
color: var(--fc-dark);
|
|
153
169
|
}
|
|
170
|
+
|
|
154
171
|
&--stop {
|
|
155
172
|
background: var(--theme-secondary-400);
|
|
156
173
|
box-shadow: 0 0 0 var(--su-static6) var(--focus-ring);
|
|
157
174
|
}
|
|
158
175
|
}
|
|
159
176
|
}
|
|
177
|
+
|
|
160
178
|
&.is-complete {
|
|
161
179
|
.s-progress {
|
|
162
180
|
&--bar,
|
|
163
181
|
&--stop {
|
|
164
182
|
background: var(--theme-secondary-400);
|
|
165
183
|
}
|
|
184
|
+
|
|
166
185
|
&--label {
|
|
167
186
|
color: var(--fc-dark);
|
|
168
187
|
}
|
|
@@ -177,6 +196,7 @@
|
|
|
177
196
|
flex-shrink: 1;
|
|
178
197
|
position: relative;
|
|
179
198
|
}
|
|
199
|
+
|
|
180
200
|
&--stop {
|
|
181
201
|
.highcontrast-mode({
|
|
182
202
|
color: var(--white);
|
|
@@ -206,6 +226,7 @@
|
|
|
206
226
|
min-width: var(--su-static6);
|
|
207
227
|
position: relative;
|
|
208
228
|
}
|
|
229
|
+
|
|
209
230
|
& &--label {
|
|
210
231
|
align-items: var(--_pr-label-ai);
|
|
211
232
|
border: var(--su-static1) solid var(--_pr-label-bc);
|
|
@@ -224,6 +245,7 @@
|
|
|
224
245
|
width: 100%;
|
|
225
246
|
z-index: calc(var(--zi-base) + 2);
|
|
226
247
|
}
|
|
248
|
+
|
|
227
249
|
& &--segments { // DEPRECATED: AFAICT, this is unused in core (as well as it's intended parent variant class `.s-progress__segmented`)
|
|
228
250
|
li {
|
|
229
251
|
&:not(:first-child):not(:last-child):before {
|
|
@@ -231,7 +253,7 @@
|
|
|
231
253
|
content: "";
|
|
232
254
|
display: block;
|
|
233
255
|
height: 100%;
|
|
234
|
-
left: calc(var(--su-
|
|
256
|
+
left: calc(var(--su-static1) * -1); // -1px
|
|
235
257
|
position: absolute;
|
|
236
258
|
top: 0;
|
|
237
259
|
width: var(--su-static4);
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
.s-prose {
|
|
2
|
+
// CONSTANTS
|
|
3
|
+
@pr-spacing: 1.1em;
|
|
4
|
+
@pr-spacing-condensed: calc(@pr-spacing / 2); // Reduce the base spacing by half in the context of lists, etc.
|
|
5
|
+
@pr-spoiler-transition: opacity 0.1s ease-in-out;
|
|
6
|
+
// COMPONENT-SPECIFIC CUSTOM PROPERTIES
|
|
2
7
|
--_pr-fs: calc(var(--su-static16) - var(--su-static1)); // Force a font size that doesn’t change at the smallest breakpoint;
|
|
3
8
|
--_pr-lh: 1.5;
|
|
4
9
|
--_pr-blockquote-ml: 1em;
|
|
@@ -12,7 +17,7 @@
|
|
|
12
17
|
--_pr-h5-fs: var(--fs-body2);
|
|
13
18
|
--_pr-h6-fs: var(--fs-body1);
|
|
14
19
|
--_pr-hr-bg: var(--black-100); // used for both background-color and color properties
|
|
15
|
-
--_pr-img-mb:
|
|
20
|
+
--_pr-img-mb: @pr-spacing;
|
|
16
21
|
--_pr-kbd-bc: var(--black-300);
|
|
17
22
|
--_pr-kbd-bs: 0 var(--su-static1) var(--su-static1) hsla(210, 8%, 5%, 0.15), inset 0 1px 0 0 @white;
|
|
18
23
|
--_pr-spoiler-cursor: pointer;
|
|
@@ -20,13 +25,9 @@
|
|
|
20
25
|
--_pr-soiler-after-o: unset;
|
|
21
26
|
--_pr-soiler-child-o: 0;
|
|
22
27
|
--_pr-soiler-child-visibility: hidden;
|
|
23
|
-
// CONSTANTS
|
|
24
|
-
--_pr-spacing: 1.1em;
|
|
25
|
-
--_pr-spacing-condensed: calc(var(--_pr-spacing) / 2); // Reduce the base spacing by half in the context of lists, etc.
|
|
26
|
-
--_pr-spoiler-transition: opacity 0.1s ease-in-out;
|
|
27
28
|
// TEMP HOT FIX FOR .s-editor [1]
|
|
28
|
-
--s-prose-spacing:
|
|
29
|
-
--s-prose-spacing-condensed:
|
|
29
|
+
--s-prose-spacing: @pr-spacing; // TODO remove once addressed in StackExchange/Stacks-Editor
|
|
30
|
+
--s-prose-spacing-condensed: @pr-spacing-condensed; // TODO remove once addressed in StackExchange/Stacks-Editor
|
|
30
31
|
|
|
31
32
|
// CONDITIONAL STYLES
|
|
32
33
|
.dark-mode({
|
|
@@ -34,10 +35,12 @@
|
|
|
34
35
|
--_pr-kbd-btc: @black-500;
|
|
35
36
|
--_pr-kbd-bs: 0 var(--su-static1) var(--su-static1) hsla(210, 8%, 5%, 0.8);
|
|
36
37
|
});
|
|
38
|
+
|
|
37
39
|
.highcontrast-mode({
|
|
38
40
|
--_pr-blockquote-before-bg: var(--black-600);
|
|
39
41
|
--_pr-hr-bg: var(--black-500);
|
|
40
42
|
});
|
|
43
|
+
|
|
41
44
|
#stacks-internals #screen-sm({
|
|
42
45
|
--_pr-spoiler-after-t: calc(var(--su8) + var(--su1)); // Adjust the position in the smallest breakpoint
|
|
43
46
|
});
|
|
@@ -52,14 +55,17 @@
|
|
|
52
55
|
--_pr-h4-fs: var(--fs-body3-relative);
|
|
53
56
|
--_pr-h5-fs: var(--fs-body2-relative);
|
|
54
57
|
}
|
|
58
|
+
|
|
55
59
|
&&__xs {
|
|
56
60
|
--_pr-fs: var(--fs-caption);
|
|
57
61
|
--_pr-lh: var(--lh-sm);
|
|
58
62
|
}
|
|
63
|
+
|
|
59
64
|
&&__sm {
|
|
60
65
|
--_pr-fs: var(--fs-body1);
|
|
61
66
|
--_pr-lh: var(--lh-md);
|
|
62
67
|
}
|
|
68
|
+
|
|
63
69
|
&&__md {
|
|
64
70
|
--_pr-fs: var(--fs-body3);
|
|
65
71
|
--_pr-lh: var(--lh-xl);
|
|
@@ -67,16 +73,18 @@
|
|
|
67
73
|
|
|
68
74
|
// CHILD ELEMENTS
|
|
69
75
|
*:not(.s-code-block) {
|
|
76
|
+
> a code {
|
|
77
|
+
color: var(--theme-link-color); // When contained within a link, we want the code to be link-colored
|
|
78
|
+
}
|
|
79
|
+
|
|
70
80
|
> code {
|
|
71
81
|
padding: var(--su2) var(--su4);
|
|
72
82
|
color: var(--black-800);
|
|
73
83
|
background-color: var(--black-075);
|
|
74
84
|
border-radius: var(--br-sm);
|
|
75
85
|
}
|
|
76
|
-
> a code {
|
|
77
|
-
color: var(--theme-link-color); // When contained within a link, we want the code to be link-colored
|
|
78
|
-
}
|
|
79
86
|
}
|
|
87
|
+
|
|
80
88
|
// Last/only child
|
|
81
89
|
blockquote,
|
|
82
90
|
dl,
|
|
@@ -100,6 +108,7 @@
|
|
|
100
108
|
margin-bottom: 0;
|
|
101
109
|
}
|
|
102
110
|
}
|
|
111
|
+
|
|
103
112
|
// Headings
|
|
104
113
|
blockquote,
|
|
105
114
|
dd,
|
|
@@ -127,6 +136,7 @@
|
|
|
127
136
|
margin-top: 1.6667em;
|
|
128
137
|
}
|
|
129
138
|
}
|
|
139
|
+
|
|
130
140
|
h1,
|
|
131
141
|
h2,
|
|
132
142
|
h3,
|
|
@@ -138,25 +148,31 @@
|
|
|
138
148
|
font-weight: bold !important;
|
|
139
149
|
margin-bottom: 0.5em;
|
|
140
150
|
}
|
|
151
|
+
|
|
141
152
|
h1 {
|
|
142
153
|
font-size: var(--_pr-h1-fs);
|
|
143
154
|
margin-bottom: 0.6em;
|
|
144
155
|
}
|
|
156
|
+
|
|
145
157
|
h2 {
|
|
146
158
|
font-size: var(--_pr-h2-fs);
|
|
147
159
|
margin-bottom: 0.7em;
|
|
148
160
|
}
|
|
161
|
+
|
|
149
162
|
h3 {
|
|
150
163
|
font-size: var(--_pr-h3-fs);
|
|
151
164
|
margin-bottom: 0.74em;
|
|
152
165
|
}
|
|
166
|
+
|
|
153
167
|
h4 {
|
|
154
168
|
font-size: var(--_pr-h4-fs);
|
|
155
169
|
margin-bottom: 1em;
|
|
156
170
|
}
|
|
171
|
+
|
|
157
172
|
h5 {
|
|
158
173
|
font-size: var(--_pr-h5-fs);
|
|
159
174
|
}
|
|
175
|
+
|
|
160
176
|
h6 {
|
|
161
177
|
font-size: var(--_pr-h6-fs);
|
|
162
178
|
}
|
|
@@ -166,12 +182,14 @@
|
|
|
166
182
|
q {
|
|
167
183
|
quotes: none;
|
|
168
184
|
}
|
|
185
|
+
|
|
169
186
|
dd,
|
|
170
187
|
dl,
|
|
171
188
|
.s-table-container,
|
|
172
189
|
.s-link-preview {
|
|
173
|
-
margin-bottom:
|
|
190
|
+
margin-bottom: @pr-spacing; // TODO: make sure this overrides margin set on dd
|
|
174
191
|
}
|
|
192
|
+
|
|
175
193
|
ol,
|
|
176
194
|
ul {
|
|
177
195
|
blockquote,
|
|
@@ -186,6 +204,7 @@
|
|
|
186
204
|
margin-bottom: 0;
|
|
187
205
|
}
|
|
188
206
|
}
|
|
207
|
+
|
|
189
208
|
blockquote,
|
|
190
209
|
dd,
|
|
191
210
|
dl,
|
|
@@ -195,28 +214,33 @@
|
|
|
195
214
|
p,
|
|
196
215
|
table,
|
|
197
216
|
ul {
|
|
198
|
-
margin-bottom:
|
|
217
|
+
margin-bottom: @pr-spacing-condensed; // Within lists, we shouldn't have so much spacing in between block-level elements.
|
|
199
218
|
}
|
|
219
|
+
|
|
200
220
|
li {
|
|
201
221
|
&:last-child {
|
|
202
222
|
margin-bottom: 0;
|
|
203
223
|
}
|
|
224
|
+
|
|
204
225
|
ol,
|
|
205
226
|
ul {
|
|
206
|
-
margin-top:
|
|
227
|
+
margin-top: @pr-spacing-condensed;
|
|
207
228
|
}
|
|
208
229
|
}
|
|
230
|
+
|
|
209
231
|
pre {
|
|
210
|
-
margin-bottom: calc(
|
|
232
|
+
margin-bottom: calc(@pr-spacing-condensed + 0.1em); // Add some more spacing on the bottom for a little extra optical alignment
|
|
211
233
|
}
|
|
212
234
|
|
|
213
|
-
margin-bottom
|
|
235
|
+
margin-bottom:@pr-spacing;
|
|
214
236
|
margin-top: 0;
|
|
215
237
|
}
|
|
238
|
+
|
|
216
239
|
sub,
|
|
217
240
|
sup {
|
|
218
241
|
--_pr-code-fs: 90%;
|
|
219
242
|
}
|
|
243
|
+
|
|
220
244
|
blockquote {
|
|
221
245
|
--_pr-img-mb: 0;
|
|
222
246
|
|
|
@@ -232,23 +256,27 @@
|
|
|
232
256
|
top: 0;
|
|
233
257
|
width: var(--su4);
|
|
234
258
|
}
|
|
259
|
+
|
|
235
260
|
*:last-child {
|
|
236
261
|
margin-bottom: 0;
|
|
237
262
|
}
|
|
263
|
+
|
|
238
264
|
blockquote {
|
|
239
265
|
--_pr-blockquote-ml: 0; // We don't need the intial indentation on nested blockquotes
|
|
240
266
|
}
|
|
241
267
|
|
|
242
268
|
color: var(--black-600);
|
|
243
|
-
margin: var(--_pr-blockquote-mt) 1em
|
|
269
|
+
margin: var(--_pr-blockquote-mt) 1em @pr-spacing var(--_pr-blockquote-ml);
|
|
244
270
|
padding: 0.8em 0.8em 0.8em 1em;
|
|
245
271
|
position: relative;
|
|
246
272
|
}
|
|
273
|
+
|
|
247
274
|
code {
|
|
248
275
|
font-size: var(--_pr-code-fs);
|
|
249
276
|
|
|
250
277
|
font-family: var(--ff-mono);
|
|
251
278
|
}
|
|
279
|
+
|
|
252
280
|
dd {
|
|
253
281
|
&:last-child {
|
|
254
282
|
margin-bottom: 0;
|
|
@@ -257,26 +285,31 @@
|
|
|
257
285
|
margin: 0;
|
|
258
286
|
padding: 0;
|
|
259
287
|
}
|
|
288
|
+
|
|
260
289
|
dl {
|
|
261
290
|
margin-top: 0;
|
|
262
291
|
}
|
|
292
|
+
|
|
263
293
|
dt {
|
|
264
294
|
font-weight: bold;
|
|
265
295
|
}
|
|
296
|
+
|
|
266
297
|
hr {
|
|
267
298
|
background-color: var(--_pr-hr-bg);
|
|
268
299
|
color: var(--_pr-hr-bg); // value set for background-color reused for color intentionally
|
|
269
300
|
|
|
270
301
|
border: 0;
|
|
271
302
|
height: var(--su-static1);
|
|
272
|
-
margin-bottom:
|
|
303
|
+
margin-bottom: @pr-spacing;
|
|
273
304
|
}
|
|
305
|
+
|
|
274
306
|
img {
|
|
275
307
|
margin-bottom: var(--_pr-img-mb);
|
|
276
308
|
|
|
277
309
|
max-width: 100%;
|
|
278
310
|
vertical-align: bottom;
|
|
279
311
|
}
|
|
312
|
+
|
|
280
313
|
kbd {
|
|
281
314
|
border: var(--su-static1) solid var(--_pr-kbd-bc);
|
|
282
315
|
border-top-color: var(--_pr-kbd-btc, var(--_pr-kbd-bc));
|
|
@@ -294,8 +327,9 @@
|
|
|
294
327
|
padding: 0.1em 0.6em;
|
|
295
328
|
text-shadow: 0 var(--su-static1) 0 var(--white);
|
|
296
329
|
}
|
|
330
|
+
|
|
297
331
|
li {
|
|
298
|
-
--_pr-blockquote-mt:
|
|
332
|
+
--_pr-blockquote-mt: @pr-spacing-condensed;
|
|
299
333
|
--_pr-img-mb: 0;
|
|
300
334
|
|
|
301
335
|
pre {
|
|
@@ -304,11 +338,13 @@
|
|
|
304
338
|
|
|
305
339
|
overflow-wrap: break-word;
|
|
306
340
|
}
|
|
341
|
+
|
|
307
342
|
p {
|
|
308
343
|
--_pr-img-mb: 0;
|
|
309
344
|
|
|
310
|
-
margin-bottom:
|
|
345
|
+
margin-bottom: @pr-spacing;
|
|
311
346
|
}
|
|
347
|
+
|
|
312
348
|
pre {
|
|
313
349
|
&:not(.s-code-block) {
|
|
314
350
|
code { // Reset the code element when contained within a <pre>
|
|
@@ -330,19 +366,21 @@
|
|
|
330
366
|
}
|
|
331
367
|
|
|
332
368
|
margin-top: 0;
|
|
333
|
-
margin-bottom: calc(
|
|
369
|
+
margin-bottom: calc(@pr-spacing + 0.4em); // Increase this spacing for better optical alignment
|
|
334
370
|
overflow-wrap: normal;
|
|
335
371
|
}
|
|
372
|
+
|
|
336
373
|
.soundcloud-embed iframe {
|
|
337
374
|
height: 116px;
|
|
338
375
|
max-width: 640px;
|
|
339
376
|
width: 100%;
|
|
340
377
|
}
|
|
378
|
+
|
|
341
379
|
.spoiler {
|
|
342
380
|
&:after {
|
|
343
381
|
opacity: var(--_pr-soiler-after-o);
|
|
344
382
|
top: var(--_pr-spoiler-after-t);
|
|
345
|
-
transition:
|
|
383
|
+
transition: @pr-spoiler-transition;
|
|
346
384
|
|
|
347
385
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' fill='rgb(132, 141, 149)' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M9 17A8 8 0 119 1a8 8 0 010 16zM8 4v6h2V4H8zm0 8v2h2v-2H8z'%3E%3C/path%3E%3C/svg%3E");
|
|
348
386
|
background-position: center right;
|
|
@@ -355,15 +393,17 @@
|
|
|
355
393
|
position: absolute;
|
|
356
394
|
right: 1em;
|
|
357
395
|
}
|
|
396
|
+
|
|
358
397
|
&.is-visible {
|
|
359
398
|
--_pr-spoiler-cursor: auto;
|
|
360
399
|
--_pr-soiler-after-o: 0;
|
|
361
400
|
--_pr-soiler-child-o: 1;
|
|
362
401
|
--_pr-soiler-child-visibility: visible;
|
|
363
402
|
}
|
|
403
|
+
|
|
364
404
|
> * {
|
|
365
405
|
opacity: var(--_pr-soiler-child-o);
|
|
366
|
-
transition:
|
|
406
|
+
transition: @pr-spoiler-transition;
|
|
367
407
|
visibility: var(--_pr-soiler-child-visibility); // hidden elements don't respond to mouse events, but still retain their space
|
|
368
408
|
}
|
|
369
409
|
|
|
@@ -374,6 +414,7 @@
|
|
|
374
414
|
color: var(--black-800);
|
|
375
415
|
min-height: var(--su-static48); // TODO: Let's find a solution that doesn't have a magic number
|
|
376
416
|
}
|
|
417
|
+
|
|
377
418
|
.youtube-embed { // [2]
|
|
378
419
|
> div {
|
|
379
420
|
iframe {
|
|
@@ -381,6 +422,7 @@
|
|
|
381
422
|
position: absolute;
|
|
382
423
|
width: 100%;
|
|
383
424
|
}
|
|
425
|
+
|
|
384
426
|
height: 35px;
|
|
385
427
|
padding-bottom: 56.25%;
|
|
386
428
|
position: relative;
|