@stackoverflow/stacks 1.5.0 → 1.6.1

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,491 +1,404 @@
1
1
  .s-prose {
2
- --s-prose-line-height: 1.5;
3
- --s-prose-spacing: 1.1em;
4
- --s-prose-spacing-condensed: calc(var(--s-prose-spacing) / 2); // Reduce the base spacing by half in the context of lists, etc.
5
-
6
- // Base styling
7
- font-size: 15px; // Force a font size that doesn’t change at the smallest breakpoint
8
- line-height: var(--s-prose-line-height);
9
- overflow-wrap: break-word;
10
-
11
- p {
12
- margin-bottom: var(--s-prose-spacing);
13
- }
14
-
15
- pre {
16
- overflow-wrap: normal;
17
- }
18
-
19
- code {
20
- font-size: var(--fs-body1);
21
- font-family: var(--ff-mono);
22
- }
23
-
24
- sub,
25
- sup {
26
- code {
27
- font-size: 90%;
2
+ --_pr-fs: calc(var(--su-static16) - var(--su-static1)); // Force a font size that doesn’t change at the smallest breakpoint;
3
+ --_pr-lh: 1.5;
4
+ --_pr-blockquote-ml: 1em;
5
+ --_pr-blockquote-mt: 0;
6
+ --_pr-blockquote-before-bg: var(--black-150);
7
+ --_pr-code-fs: var(--fs-body1);
8
+ --_pr-h1-fs: var(--fs-headline1);
9
+ --_pr-h2-fs: var(--fs-title);
10
+ --_pr-h3-fs: var(--fs-subheading);
11
+ --_pr-h4-fs: var(--fs-body3);
12
+ --_pr-h5-fs: var(--fs-body2);
13
+ --_pr-h6-fs: var(--fs-body1);
14
+ --_pr-hr-bg: var(--black-100); // used for both background-color and color properties
15
+ --_pr-img-mb: var(--_pr-spacing);
16
+ --_pr-kbd-bc: var(--black-300);
17
+ --_pr-kbd-bs: 0 var(--su-static1) var(--su-static1) hsla(210, 8%, 5%, 0.15), inset 0 1px 0 0 @white;
18
+ --_pr-spoiler-cursor: pointer;
19
+ --_pr-spoiler-after-t: 1em;
20
+ --_pr-soiler-after-o: unset;
21
+ --_pr-soiler-child-o: 0;
22
+ --_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
+ // CONDITIONAL STYLES
29
+ .dark-mode({
30
+ --_pr-kbd-bc: transparent;
31
+ --_pr-kbd-btc: @black-500;
32
+ --_pr-kbd-bs: 0 var(--su-static1) var(--su-static1) hsla(210, 8%, 5%, 0.8);
33
+ });
34
+ .highcontrast-mode({
35
+ --_pr-blockquote-before-bg: var(--black-600);
36
+ --_pr-hr-bg: var(--black-500);
37
+ });
38
+ #stacks-internals #screen-sm({
39
+ --_pr-spoiler-after-t: calc(var(--su8) + var(--su1)); // Adjust the position in the smallest breakpoint
40
+ });
41
+
42
+ // MODIFIERS
43
+ &&__xs,
44
+ &&__sm,
45
+ &&__md {
46
+ --_pr-h1-fs: var(--fs-headline1-relative);
47
+ --_pr-h2-fs: var(--fs-title-relative);
48
+ --_pr-h3-fs: var(--fs-subheading-relative);
49
+ --_pr-h4-fs: var(--fs-body3-relative);
50
+ --_pr-h5-fs: var(--fs-body2-relative);
51
+ }
52
+ &&__xs {
53
+ --_pr-fs: var(--fs-caption);
54
+ --_pr-lh: var(--lh-sm);
55
+ }
56
+ &&__sm {
57
+ --_pr-fs: var(--fs-body1);
58
+ --_pr-lh: var(--lh-md);
59
+ }
60
+ &&__md {
61
+ --_pr-fs: var(--fs-body3);
62
+ --_pr-lh: var(--lh-xl);
63
+ }
64
+
65
+ // CHILD ELEMENTS
66
+ *:not(.s-code-block) {
67
+ > code {
68
+ padding: var(--su2) var(--su4);
69
+ color: var(--black-800);
70
+ background-color: var(--black-075);
71
+ border-radius: var(--br-sm);
28
72
  }
29
- }
30
-
31
- hr {
32
- border: 0;
33
- color: var(--black-100);
34
- background-color: var(--black-100);
35
- height: 1px;
36
- margin-bottom: var(--s-prose-spacing);
37
-
38
- .highcontrast-mode({
39
- color: var(--black-500);
40
- background-color: var(--black-500);
41
- });
42
- }
43
-
44
- li {
45
- overflow-wrap: break-word;
46
-
47
- pre {
48
- overflow-wrap: normal;
73
+ > a code {
74
+ color: var(--theme-link-color); // When contained within a link, we want the code to be link-colored
49
75
  }
50
76
  }
51
-
52
- p,
53
- dl,
77
+ // Last/only child
54
78
  blockquote,
55
- table,
56
- .s-table-container,
57
- .s-link-preview,
58
- hr,
59
- ol,
60
- ul,
61
- img,
62
- pre,
79
+ dl,
63
80
  h1,
64
81
  h2,
65
82
  h3,
66
83
  h4,
67
84
  h5,
68
- h6 {
85
+ h6,
86
+ hr,
87
+ img,
88
+ ol,
89
+ p,
90
+ pre,
91
+ table,
92
+ ul,
93
+ .s-link-preview,
94
+ .s-table-container {
69
95
  &:last-child,
70
96
  &:only-child {
71
97
  margin-bottom: 0;
72
98
  }
73
99
  }
74
-
75
- // ============================================================================
76
- // $ HEADERS
77
- // ----------------------------------------------------------------------------
100
+ // Headings
101
+ blockquote,
102
+ dd,
103
+ dl,
104
+ img,
105
+ ol,
106
+ p,
107
+ pre,
108
+ table,
109
+ ul,
110
+ .s-link-preview,
111
+ .s-table-container {
112
+ + h1 {
113
+ margin-top: 1.5667em;
114
+ }
115
+ + h2 {
116
+ margin-top: 1.667em;
117
+ }
118
+ + h3 {
119
+ margin-top: 1.4667em;
120
+ }
121
+ + h4,
122
+ + h5,
123
+ + h6 {
124
+ margin-top: 1.6667em;
125
+ }
126
+ }
78
127
  h1,
79
128
  h2,
80
129
  h3,
81
130
  h4,
82
131
  h5,
83
132
  h6 {
133
+ --_pr-code-fs: 0.9em;
134
+
84
135
  font-weight: bold !important;
85
136
  margin-bottom: 0.5em;
86
-
87
- code {
88
- font-size: 0.9em;
89
- }
90
137
  }
91
-
92
138
  h1 {
93
- font-size: var(--fs-headline1);
139
+ font-size: var(--_pr-h1-fs);
94
140
  margin-bottom: 0.6em;
95
141
  }
96
-
97
142
  h2 {
98
- font-size: var(--fs-title);
143
+ font-size: var(--_pr-h2-fs);
99
144
  margin-bottom: 0.7em;
100
145
  }
101
-
102
146
  h3 {
103
- font-size: var(--fs-subheading);
147
+ font-size: var(--_pr-h3-fs);
104
148
  margin-bottom: 0.74em;
105
149
  }
106
-
107
150
  h4 {
108
- font-size: var(--fs-body3);
151
+ font-size: var(--_pr-h4-fs);
109
152
  margin-bottom: 1em;
110
153
  }
111
-
112
154
  h5 {
113
- font-size: var(--fs-body2);
155
+ font-size: var(--_pr-h5-fs);
114
156
  }
115
-
116
157
  h6 {
117
- font-size: var(--fs-body1);
158
+ font-size: var(--_pr-h6-fs);
118
159
  }
119
160
 
120
- img,
121
- dl,
122
- p,
123
- pre,
161
+ // Others child elements
124
162
  blockquote,
125
- table,
126
- .s-table-container,
127
- .s-link-preview,
128
- dd,
129
- ul,
130
- ol {
131
- & + h1 {
132
- margin-top: 1.5667em;
133
- }
134
-
135
- & + h2 {
136
- margin-top: 1.667em;
137
- }
138
-
139
- & + h3 {
140
- margin-top: 1.4667em;
141
- }
142
-
143
- & + h4,
144
- & + h5,
145
- & + h6 {
146
- margin-top: 1.6667em;
147
- }
148
- }
149
-
150
- // ============================================================================
151
- // $ IMAGES
152
- // ----------------------------------------------------------------------------
153
- img {
154
- max-width: 100%;
155
- margin-bottom: var(--s-prose-spacing);
156
- vertical-align: bottom;
163
+ q {
164
+ quotes: none;
157
165
  }
158
-
159
- blockquote,
160
- li,
161
- p {
162
- img {
163
- margin-bottom: 0;
164
- }
166
+ dd,
167
+ dl,
168
+ .s-table-container,
169
+ .s-link-preview {
170
+ margin-bottom: var(--_pr-spacing); // TODO: make sure this overrides margin set on dd
165
171
  }
166
-
167
- // ============================================================================
168
- // $ LISTS
169
- // ----------------------------------------------------------------------------
170
172
  ol,
171
173
  ul {
172
- margin-top: 0;
173
- margin-bottom: var(--s-prose-spacing);
174
-
175
- p,
176
- dl,
177
174
  blockquote,
178
- table,
175
+ dl,
179
176
  hr,
180
177
  ol,
178
+ p,
179
+ table,
181
180
  ul {
182
181
  &:last-child,
183
182
  &:only-child {
184
183
  margin-bottom: 0;
185
184
  }
186
185
  }
187
-
188
- // Within lists, we shouldn't have so much spacing
189
- // in between block-level elements.
186
+ blockquote,
187
+ dd,
190
188
  dl,
189
+ hr,
190
+ li,
191
+ ol,
191
192
  p,
192
- blockquote,
193
193
  table,
194
- hr,
195
- dd,
196
- ul,
197
- ol {
198
- margin-bottom: var(--s-prose-spacing-condensed);
194
+ ul {
195
+ margin-bottom: var(--_pr-spacing-condensed); // Within lists, we shouldn't have so much spacing in between block-level elements.
196
+ }
197
+ li {
198
+ &:last-child {
199
+ margin-bottom: 0;
200
+ }
201
+ ol,
202
+ ul {
203
+ margin-top: var(--_pr-spacing-condensed);
204
+ }
199
205
  }
200
-
201
206
  pre {
202
- // Add some more spacing on the bottom
203
- // For a little extra optical alignment
204
- margin-bottom: calc(var(--s-prose-spacing-condensed) + 0.1em);
207
+ margin-bottom: calc(var(--_pr-spacing-condensed) + 0.1em); // Add some more spacing on the bottom for a little extra optical alignment
205
208
  }
209
+
210
+ margin-bottom: var(--_pr-spacing);
211
+ margin-top: 0;
212
+ }
213
+ sub,
214
+ sup {
215
+ --_pr-code-fs: 90%;
206
216
  }
217
+ blockquote {
218
+ --_pr-img-mb: 0;
207
219
 
208
- ol li,
209
- ul li {
210
- margin-bottom: var(--s-prose-spacing-condensed);
220
+ &:before {
221
+ background: var(--_pr-blockquote-before-bg);
211
222
 
212
- &:last-child {
223
+ border-radius: var(--su-static8);
224
+ bottom: 0;
225
+ content: "";
226
+ display: block;
227
+ left: 0;
228
+ position: absolute;
229
+ top: 0;
230
+ width: var(--su4);
231
+ }
232
+ *:last-child {
213
233
  margin-bottom: 0;
214
234
  }
215
- }
216
-
217
- li {
218
- > ul,
219
- > ol {
220
- margin-top: var(--s-prose-spacing-condensed);
235
+ blockquote {
236
+ --_pr-blockquote-ml: 0; // We don't need the intial indentation on nested blockquotes
221
237
  }
222
- }
223
238
 
224
- // ============================================================================
225
- // $ TABLES
226
- // ----------------------------------------------------------------------------
227
- .s-table-container {
228
- margin-bottom: var(--s-prose-spacing);
239
+ color: var(--black-600);
240
+ margin: var(--_pr-blockquote-mt) 1em var(--_pr-spacing) var(--_pr-blockquote-ml);
241
+ padding: 0.8em 0.8em 0.8em 1em;
242
+ position: relative;
229
243
  }
244
+ code {
245
+ font-size: var(--_pr-code-fs);
230
246
 
231
- // ============================================================================
232
- // $ LINK PREVIEWS
233
- // ----------------------------------------------------------------------------
234
- .s-link-preview {
235
- margin-bottom: var(--s-prose-spacing);
247
+ font-family: var(--ff-mono);
236
248
  }
249
+ dd {
250
+ &:last-child {
251
+ margin-bottom: 0;
252
+ }
237
253
 
238
- // ============================================================================
239
- // $ DEFINITION LISTS
240
- // ----------------------------------------------------------------------------
254
+ margin: 0;
255
+ padding: 0;
256
+ }
241
257
  dl {
242
258
  margin-top: 0;
243
- margin-bottom: var(--s-prose-spacing);
244
259
  }
245
-
246
260
  dt {
247
261
  font-weight: bold;
248
262
  }
263
+ hr {
264
+ background-color: var(--_pr-hr-bg);
265
+ color: var(--_pr-hr-bg); // value set for background-color reused for color intentionally
249
266
 
250
- dd {
251
- margin: 0;
252
- margin-bottom: var(--s-prose-spacing);
253
- padding: 0;
254
-
255
- &:last-child {
256
- margin-bottom: 0;
257
- }
258
- }
259
-
260
- // The outer div enforces a max-width of 640px. The inner div has a height of 35 pixels, and a
261
- // padding-bottom of 56.25%. Padding percentages, even for top/bottom, are always relative
262
- // to the *width*, so the padding always has an aspect ratio of 1/0.5625, or 16/9. Thus in total,
263
- // the iframe has a height of 35 + width * 9/16. 35 pixels is the height of youtube's player controls,
264
- // so we have exactly the space we need for video + controls. The iframe is positioned absolutely
265
- // because only in that case does the containing block include the padding. The inner div exists
266
- // because without it you couldn't correctly handle max-width (as there obviously isn't a max-padding-bottom).
267
- .youtube-embed {
268
- width: 100%;
269
- max-width: 640px;
270
- position: relative;
271
-
272
- > div {
273
- width: 100%;
274
- height: 35px;
275
- padding-bottom: 56.25%;
276
- position: relative;
277
-
278
- iframe {
279
- position: absolute;
280
- width: 100%;
281
- height: 100%;
282
- }
283
- }
267
+ border: 0;
268
+ height: var(--su-static1);
269
+ margin-bottom: var(--_pr-spacing);
284
270
  }
271
+ img {
272
+ margin-bottom: var(--_pr-img-mb);
285
273
 
286
- .soundcloud-embed iframe {
287
- width: 100%;
288
- max-width: 640px;
289
- height: 116px;
274
+ max-width: 100%;
275
+ vertical-align: bottom;
290
276
  }
277
+ kbd {
278
+ border: var(--su-static1) solid var(--_pr-kbd-bc);
279
+ border-top-color: var(--_pr-kbd-btc, var(--_pr-kbd-bc));
280
+ box-shadow: var(--_pr-kbd-bs);
291
281
 
292
- // ============================================================================
293
- // $ BLOCKQUOTES
294
- // ----------------------------------------------------------------------------
295
- blockquote,
296
- q {
297
- quotes: none;
282
+ background-color: var(--black-075);
283
+ border-radius: var(--br-sm);
284
+ color: var(--black-800);
285
+ display: inline-block;
286
+ font-family: var(--ff-sans);
287
+ font-size: var(--fs-fine);
288
+ line-height: var(--_pr-lh);
289
+ margin: 0 0.1em;
290
+ overflow-wrap: break-word;
291
+ padding: 0.1em 0.6em;
292
+ text-shadow: 0 var(--su-static1) 0 var(--white);
298
293
  }
294
+ li {
295
+ --_pr-blockquote-mt: var(--_pr-spacing-condensed);
296
+ --_pr-img-mb: 0;
299
297
 
300
- blockquote {
301
- position: relative;
302
- margin: 0 1em var(--s-prose-spacing) 1em;
303
- padding: 0.8em 0.8em 0.8em 1em;
304
- color: var(--black-600);
305
-
306
- &:before {
307
- content: "";
308
- display: block;
309
- position: absolute;
310
- top: 0;
311
- bottom: 0;
312
- left: 0;
313
- width: var(--su4);
314
- border-radius: var(--su-static8);
315
- background: var(--black-150);
316
-
317
- .highcontrast-mode({
318
- background: var(--black-600);
319
- });
320
- }
321
-
322
- blockquote {
323
- margin-left: 0; // We don't need the intial indentation on nested blockquotes
298
+ pre {
299
+ overflow-wrap: normal;
324
300
  }
325
301
 
326
- * {
327
- &:last-child { margin-bottom: 0; }
328
- }
302
+ overflow-wrap: break-word;
329
303
  }
304
+ p {
305
+ --_pr-img-mb: 0;
330
306
 
331
- // Blockquotes inside list
332
- li {
333
- blockquote {
334
- margin-top: var(--s-prose-spacing-condensed);
335
- }
307
+ margin-bottom: var(--_pr-spacing);
336
308
  }
337
-
338
- // ============================================================================
339
- // $ SPOILERS
340
- // ----------------------------------------------------------------------------
341
- .spoiler {
342
- background: var(--black-050);
343
- border-radius: var(--br-md);
344
- color: var(--black-800);
345
- cursor: pointer;
346
- min-height: var(--su-static48); // TODO: Let's find a solution that doesn't have a magic number
347
-
348
- > * {
349
- visibility: hidden; // hidden elements don't respond to mouse events, but still retain their space
350
- opacity: 0;
351
- transition: opacity 0.1s ease-in-out;
352
- }
353
-
354
- &.is-visible {
355
- cursor: auto;
356
-
357
- > * {
358
- visibility: visible;
359
- opacity: 1;
309
+ pre {
310
+ &:not(.s-code-block) {
311
+ code { // Reset the code element when contained within a <pre>
312
+ background-color: transparent;
313
+ border-radius: 0;
314
+ padding: 0;
360
315
  }
361
316
 
362
- &:after {
363
- opacity: 0;
364
- }
317
+ @scrollbar-styles();
318
+ background-color: var(--highlight-bg);
319
+ border-radius: var(--br-md);
320
+ color: var(--highlight-color);
321
+ font-size: var(--fs-body1);
322
+ line-height: var(--lh-md);
323
+ max-height: 600px;
324
+ overflow: auto;
325
+ padding: var(--su12);
326
+ width: auto;
365
327
  }
366
328
 
329
+ margin-top: 0;
330
+ margin-bottom: calc(var(--_pr-spacing) + 0.4em); // Increase this spacing for better optical alignment
331
+ overflow-wrap: normal;
332
+ }
333
+ .soundcloud-embed iframe {
334
+ height: 116px;
335
+ max-width: 640px;
336
+ width: 100%;
337
+ }
338
+ .spoiler {
367
339
  &:after {
368
- content: attr(data-spoiler) " ";
340
+ opacity: var(--_pr-soiler-after-o);
341
+ top: var(--_pr-spoiler-after-t);
342
+ transition: var(--_pr-spoiler-transition);
343
+
369
344
  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");
370
- background-repeat: no-repeat;
371
345
  background-position: center right;
372
- font-size: var(--fs-body1);
346
+ background-repeat: no-repeat;
373
347
  color: var(--black-500);
374
- padding-right: 22px;
348
+ content: attr(data-spoiler) " ";
349
+ font-size: var(--fs-body1);
350
+ padding-right: calc(var(--su24) - var(--su2));
351
+ pointer-events: none;
375
352
  position: absolute;
376
- top: 1em;
377
353
  right: 1em;
378
- transition: opacity 0.1s ease-in-out;
379
- pointer-events: none;
380
-
381
- #stacks-internals #screen-sm({
382
- top: 9px; // Adjust the position in the smallest breakpoint
383
- });
384
354
  }
385
- }
386
-
387
- // ============================================================================
388
- // $ KEYBOARD
389
- // ----------------------------------------------------------------------------
390
- kbd {
391
- display: inline-block;
392
- margin: 0 0.1em;
393
- padding: 0.1em 0.6em;
394
- font-family: var(--ff-sans);
395
- font-size: var(--fs-fine);
396
- line-height: var(--s-prose-line-height);
397
- color: var(--black-800);
398
- text-shadow: 0 1px 0 var(--white);
399
- background-color: var(--black-075);
400
- border: 1px solid var(--black-300);
401
- border-radius: var(--br-sm);
402
- box-shadow: 0 1px 1px hsla(210, 8%, 5%, 0.15), inset 0 1px 0 0 @white;
403
- overflow-wrap: break-word;
355
+ &.is-visible {
356
+ --_pr-spoiler-cursor: auto;
357
+ --_pr-soiler-after-o: 0;
358
+ --_pr-soiler-child-o: 1;
359
+ --_pr-soiler-child-visibility: visible;
360
+ }
361
+ > * {
362
+ opacity: var(--_pr-soiler-child-o);
363
+ transition: var(--_pr-spoiler-transition);
364
+ visibility: var(--_pr-soiler-child-visibility); // hidden elements don't respond to mouse events, but still retain their space
365
+ }
404
366
 
405
- .dark-mode({
406
- box-shadow: 0 1px 1px hsla(210, 8%, 5%, 0.8);
407
- border-color: transparent;
408
- border-top-color: @black-500;
409
- });
410
- }
367
+ cursor: var(--_pr-spoiler-cursor);
411
368
 
412
- // ============================================================================
413
- // $ CODE STYLES
414
- // ----------------------------------------------------------------------------
415
- *:not(.s-code-block) > code {
416
- padding: var(--su2) var(--su4);
369
+ background: var(--black-050);
370
+ border-radius: var(--br-md);
417
371
  color: var(--black-800);
418
- background-color: var(--black-075);
419
- border-radius: var(--br-sm);
420
- }
421
-
422
- // When contained within a link, we want the code to be link-colored
423
- *:not(.s-code-block) > a code {
424
- color: var(--theme-link-color);
425
- }
426
-
427
- pre {
428
- margin-top: 0;
429
- margin-bottom: calc(var(--s-prose-spacing) + 0.4em); // Increase this spacing for better optical alignment
372
+ min-height: var(--su-static48); // TODO: Let's find a solution that doesn't have a magic number
430
373
  }
431
-
432
- pre:not(.s-code-block) {
433
- padding: var(--su12);
434
- color: var(--highlight-color);
435
- width: auto;
436
- max-height: 600px;
437
- overflow: auto;
438
- font-size: var(--fs-body1);
439
- line-height: var(--lh-md);
440
- background-color: var(--highlight-bg);
441
- border-radius: var(--br-md);
442
-
443
- // Reset the code element when contained within a <pre>
444
- code {
445
- background-color: transparent;
446
- padding: 0;
447
- border-radius: 0;
374
+ .youtube-embed { // [1]
375
+ > div {
376
+ iframe {
377
+ height: 100%;
378
+ position: absolute;
379
+ width: 100%;
380
+ }
381
+ height: 35px;
382
+ padding-bottom: 56.25%;
383
+ position: relative;
384
+ width: 100%;
448
385
  }
449
386
 
450
- @scrollbar-styles();
451
- }
452
-
453
- &.s-prose__xs {
454
- font-size: var(--fs-caption);
455
- line-height: var(--lh-sm);
456
- }
457
-
458
- &.s-prose__sm {
459
- font-size: var(--fs-body1);
460
- line-height: var(--lh-md);
461
- }
462
-
463
- &.s-prose__md {
464
- font-size: var(--fs-body3);
465
- line-height: var(--lh-xl);
387
+ max-width: 640px;
388
+ position: relative;
389
+ width: 100%;
466
390
  }
467
391
 
468
- &.s-prose__xs,
469
- &.s-prose__sm,
470
- &.s-prose__md {
471
- h1 {
472
- font-size: var(--fs-headline1-relative);
473
- }
392
+ font-size: var(--_pr-fs); // Force a font size that doesn’t change at the smallest breakpoint
393
+ line-height: var(--_pr-lh);
474
394
 
475
- h2 {
476
- font-size: var(--fs-title-relative);
477
- }
478
-
479
- h3 {
480
- font-size: var(--fs-subheading-relative);
481
- }
482
-
483
- h4 {
484
- font-size: var(--fs-body3-relative);
485
- }
486
-
487
- h5 {
488
- font-size: var(--fs-body2-relative);
489
- }
490
- }
395
+ overflow-wrap: break-word;
491
396
  }
397
+
398
+ // [1] The outer div enforces a max-width of 640px. The inner div has a height of 35 pixels, and a
399
+ // padding-bottom of 56.25%. Padding percentages, even for top/bottom, are always relative
400
+ // to the *width*, so the padding always has an aspect ratio of 1/0.5625, or 16/9. Thus in total,
401
+ // the iframe has a height of 35 + width * 9/16. 35 pixels is the height of youtube's player controls,
402
+ // so we have exactly the space we need for video + controls. The iframe is positioned absolutely
403
+ // because only in that case does the containing block include the padding. The inner div exists
404
+ // because without it you couldn't correctly handle max-width (as there obviously isn't a max-padding-bottom).