typography-stylecss 0.7.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/src/styles.js ADDED
@@ -0,0 +1,1641 @@
1
+ const colors = require('tailwindcss/colors')
2
+
3
+ const round = (num) =>
4
+ num
5
+ .toFixed(7)
6
+ .replace(/(\.[0-9]+?)0+$/, '$1')
7
+ .replace(/\.0$/, '')
8
+ const rem = (px) => `${round(px / 16)}rem`
9
+ const em = (px, base) => `${round(px / base)}em`
10
+ const opacity = (color, opacity) => {
11
+ // In v3, the colors are hex encoded and a previous typography plugin version
12
+ // only handled these values. We keep the old behavior for backward
13
+ // compatibility with v3 codebases but use color-mix for any other color
14
+ // values.
15
+ let hex = color.replace('#', '')
16
+ hex = hex.length === 3 ? hex.replace(/./g, '$&$&') : hex
17
+
18
+ let r = parseInt(hex.substring(0, 2), 16)
19
+ let g = parseInt(hex.substring(2, 4), 16)
20
+ let b = parseInt(hex.substring(4, 6), 16)
21
+
22
+ if (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b)) {
23
+ return `color-mix(in oklab, ${color} ${opacity}, transparent)`
24
+ }
25
+
26
+ return `rgb(${r} ${g} ${b} / ${opacity})`
27
+ }
28
+
29
+ let defaultModifiers = {
30
+ sm: {
31
+ css: [
32
+ {
33
+ fontSize: rem(14),
34
+ lineHeight: round(24 / 14),
35
+ p: {
36
+ marginTop: em(16, 14),
37
+ marginBottom: em(16, 14),
38
+ },
39
+ '[class~="lead"]': {
40
+ fontSize: em(18, 14),
41
+ lineHeight: round(28 / 18),
42
+ marginTop: em(16, 18),
43
+ marginBottom: em(16, 18),
44
+ },
45
+ blockquote: {
46
+ marginTop: em(24, 18),
47
+ marginBottom: em(24, 18),
48
+ paddingInlineStart: em(20, 18),
49
+ },
50
+ h1: {
51
+ fontSize: em(30, 14),
52
+ marginTop: '0',
53
+ marginBottom: em(24, 30),
54
+ lineHeight: round(36 / 30),
55
+ },
56
+ h2: {
57
+ fontSize: em(20, 14),
58
+ marginTop: em(32, 20),
59
+ marginBottom: em(16, 20),
60
+ lineHeight: round(28 / 20),
61
+ },
62
+ h3: {
63
+ fontSize: em(18, 14),
64
+ marginTop: em(28, 18),
65
+ marginBottom: em(8, 18),
66
+ lineHeight: round(28 / 18),
67
+ },
68
+ h4: {
69
+ marginTop: em(20, 14),
70
+ marginBottom: em(8, 14),
71
+ lineHeight: round(20 / 14),
72
+ },
73
+ img: {
74
+ marginTop: em(24, 14),
75
+ marginBottom: em(24, 14),
76
+ },
77
+ picture: {
78
+ marginTop: em(24, 14),
79
+ marginBottom: em(24, 14),
80
+ },
81
+ 'picture > img': {
82
+ marginTop: '0',
83
+ marginBottom: '0',
84
+ },
85
+ video: {
86
+ marginTop: em(24, 14),
87
+ marginBottom: em(24, 14),
88
+ },
89
+ kbd: {
90
+ fontSize: em(12, 14),
91
+ borderRadius: rem(5),
92
+ paddingTop: em(2, 14),
93
+ paddingInlineEnd: em(5, 14),
94
+ paddingBottom: em(2, 14),
95
+ paddingInlineStart: em(5, 14),
96
+ },
97
+ code: {
98
+ fontSize: em(12, 14),
99
+ },
100
+ 'h2 code': {
101
+ fontSize: em(18, 20),
102
+ },
103
+ 'h3 code': {
104
+ fontSize: em(16, 18),
105
+ },
106
+ pre: {
107
+ fontSize: em(12, 14),
108
+ lineHeight: round(20 / 12),
109
+ marginTop: em(20, 12),
110
+ marginBottom: em(20, 12),
111
+ borderRadius: rem(4),
112
+ paddingTop: em(8, 12),
113
+ paddingInlineEnd: em(12, 12),
114
+ paddingBottom: em(8, 12),
115
+ paddingInlineStart: em(12, 12),
116
+ },
117
+ ol: {
118
+ marginTop: em(16, 14),
119
+ marginBottom: em(16, 14),
120
+ paddingInlineStart: em(22, 14),
121
+ },
122
+ ul: {
123
+ marginTop: em(16, 14),
124
+ marginBottom: em(16, 14),
125
+ paddingInlineStart: em(22, 14),
126
+ },
127
+ li: {
128
+ marginTop: em(4, 14),
129
+ marginBottom: em(4, 14),
130
+ },
131
+ 'ol > li': {
132
+ paddingInlineStart: em(6, 14),
133
+ },
134
+ 'ul > li': {
135
+ paddingInlineStart: em(6, 14),
136
+ },
137
+ '> ul > li p': {
138
+ marginTop: em(8, 14),
139
+ marginBottom: em(8, 14),
140
+ },
141
+ '> ul > li > p:first-child': {
142
+ marginTop: em(16, 14),
143
+ },
144
+ '> ul > li > p:last-child': {
145
+ marginBottom: em(16, 14),
146
+ },
147
+ '> ol > li > p:first-child': {
148
+ marginTop: em(16, 14),
149
+ },
150
+ '> ol > li > p:last-child': {
151
+ marginBottom: em(16, 14),
152
+ },
153
+ 'ul ul, ul ol, ol ul, ol ol': {
154
+ marginTop: em(8, 14),
155
+ marginBottom: em(8, 14),
156
+ },
157
+ dl: {
158
+ marginTop: em(16, 14),
159
+ marginBottom: em(16, 14),
160
+ },
161
+ dt: {
162
+ marginTop: em(16, 14),
163
+ },
164
+ dd: {
165
+ marginTop: em(4, 14),
166
+ paddingInlineStart: em(22, 14),
167
+ },
168
+ hr: {
169
+ marginTop: em(40, 14),
170
+ marginBottom: em(40, 14),
171
+ },
172
+ 'hr + *': {
173
+ marginTop: '0',
174
+ },
175
+ 'h2 + *': {
176
+ marginTop: '0',
177
+ },
178
+ 'h3 + *': {
179
+ marginTop: '0',
180
+ },
181
+ 'h4 + *': {
182
+ marginTop: '0',
183
+ },
184
+ table: {
185
+ fontSize: em(12, 14),
186
+ lineHeight: round(18 / 12),
187
+ },
188
+ 'thead th': {
189
+ paddingInlineEnd: em(12, 12),
190
+ paddingBottom: em(8, 12),
191
+ paddingInlineStart: em(12, 12),
192
+ },
193
+ 'thead th:first-child': {
194
+ paddingInlineStart: '0',
195
+ },
196
+ 'thead th:last-child': {
197
+ paddingInlineEnd: '0',
198
+ },
199
+ 'tbody td, tfoot td': {
200
+ paddingTop: em(8, 12),
201
+ paddingInlineEnd: em(12, 12),
202
+ paddingBottom: em(8, 12),
203
+ paddingInlineStart: em(12, 12),
204
+ },
205
+ 'tbody td:first-child, tfoot td:first-child': {
206
+ paddingInlineStart: '0',
207
+ },
208
+ 'tbody td:last-child, tfoot td:last-child': {
209
+ paddingInlineEnd: '0',
210
+ },
211
+ figure: {
212
+ marginTop: em(24, 14),
213
+ marginBottom: em(24, 14),
214
+ },
215
+ 'figure > *': {
216
+ marginTop: '0',
217
+ marginBottom: '0',
218
+ },
219
+ figcaption: {
220
+ fontSize: em(12, 14),
221
+ lineHeight: round(16 / 12),
222
+ marginTop: em(8, 12),
223
+ },
224
+ },
225
+ {
226
+ '> :first-child': {
227
+ marginTop: '0',
228
+ },
229
+ '> :last-child': {
230
+ marginBottom: '0',
231
+ },
232
+ },
233
+ ],
234
+ },
235
+ base: {
236
+ css: [
237
+ {
238
+ fontSize: rem(16),
239
+ lineHeight: round(28 / 16),
240
+ p: {
241
+ marginTop: em(20, 16),
242
+ marginBottom: em(20, 16),
243
+ },
244
+ '[class~="lead"]': {
245
+ fontSize: em(20, 16),
246
+ lineHeight: round(32 / 20),
247
+ marginTop: em(24, 20),
248
+ marginBottom: em(24, 20),
249
+ },
250
+ blockquote: {
251
+ marginTop: em(32, 20),
252
+ marginBottom: em(32, 20),
253
+ paddingInlineStart: em(20, 20),
254
+ },
255
+ h1: {
256
+ fontSize: em(36, 16),
257
+ marginTop: '0',
258
+ marginBottom: em(32, 36),
259
+ lineHeight: round(40 / 36),
260
+ },
261
+ h2: {
262
+ fontSize: em(24, 16),
263
+ marginTop: em(48, 24),
264
+ marginBottom: em(24, 24),
265
+ lineHeight: round(32 / 24),
266
+ },
267
+ h3: {
268
+ fontSize: em(20, 16),
269
+ marginTop: em(32, 20),
270
+ marginBottom: em(12, 20),
271
+ lineHeight: round(32 / 20),
272
+ },
273
+ h4: {
274
+ marginTop: em(24, 16),
275
+ marginBottom: em(8, 16),
276
+ lineHeight: round(24 / 16),
277
+ },
278
+ img: {
279
+ marginTop: em(32, 16),
280
+ marginBottom: em(32, 16),
281
+ },
282
+ picture: {
283
+ marginTop: em(32, 16),
284
+ marginBottom: em(32, 16),
285
+ },
286
+ 'picture > img': {
287
+ marginTop: '0',
288
+ marginBottom: '0',
289
+ },
290
+ video: {
291
+ marginTop: em(32, 16),
292
+ marginBottom: em(32, 16),
293
+ },
294
+ kbd: {
295
+ fontSize: em(14, 16),
296
+ borderRadius: rem(5),
297
+ paddingTop: em(3, 16),
298
+ paddingInlineEnd: em(6, 16),
299
+ paddingBottom: em(3, 16),
300
+ paddingInlineStart: em(6, 16),
301
+ },
302
+ code: {
303
+ fontSize: em(14, 16),
304
+ },
305
+ 'h2 code': {
306
+ fontSize: em(21, 24),
307
+ },
308
+ 'h3 code': {
309
+ fontSize: em(18, 20),
310
+ },
311
+ pre: {
312
+ fontSize: em(14, 16),
313
+ lineHeight: round(24 / 14),
314
+ marginTop: em(24, 14),
315
+ marginBottom: em(24, 14),
316
+ borderRadius: rem(6),
317
+ paddingTop: em(12, 14),
318
+ paddingInlineEnd: em(16, 14),
319
+ paddingBottom: em(12, 14),
320
+ paddingInlineStart: em(16, 14),
321
+ },
322
+ ol: {
323
+ marginTop: em(20, 16),
324
+ marginBottom: em(20, 16),
325
+ paddingInlineStart: em(26, 16),
326
+ },
327
+ ul: {
328
+ marginTop: em(20, 16),
329
+ marginBottom: em(20, 16),
330
+ paddingInlineStart: em(26, 16),
331
+ },
332
+ li: {
333
+ marginTop: em(8, 16),
334
+ marginBottom: em(8, 16),
335
+ },
336
+ 'ol > li': {
337
+ paddingInlineStart: em(6, 16),
338
+ },
339
+ 'ul > li': {
340
+ paddingInlineStart: em(6, 16),
341
+ },
342
+ '> ul > li p': {
343
+ marginTop: em(12, 16),
344
+ marginBottom: em(12, 16),
345
+ },
346
+ '> ul > li > p:first-child': {
347
+ marginTop: em(20, 16),
348
+ },
349
+ '> ul > li > p:last-child': {
350
+ marginBottom: em(20, 16),
351
+ },
352
+ '> ol > li > p:first-child': {
353
+ marginTop: em(20, 16),
354
+ },
355
+ '> ol > li > p:last-child': {
356
+ marginBottom: em(20, 16),
357
+ },
358
+ 'ul ul, ul ol, ol ul, ol ol': {
359
+ marginTop: em(12, 16),
360
+ marginBottom: em(12, 16),
361
+ },
362
+ dl: {
363
+ marginTop: em(20, 16),
364
+ marginBottom: em(20, 16),
365
+ },
366
+ dt: {
367
+ marginTop: em(20, 16),
368
+ },
369
+ dd: {
370
+ marginTop: em(8, 16),
371
+ paddingInlineStart: em(26, 16),
372
+ },
373
+ hr: {
374
+ marginTop: em(48, 16),
375
+ marginBottom: em(48, 16),
376
+ },
377
+ 'hr + *': {
378
+ marginTop: '0',
379
+ },
380
+ 'h2 + *': {
381
+ marginTop: '0',
382
+ },
383
+ 'h3 + *': {
384
+ marginTop: '0',
385
+ },
386
+ 'h4 + *': {
387
+ marginTop: '0',
388
+ },
389
+ table: {
390
+ fontSize: em(14, 16),
391
+ lineHeight: round(24 / 14),
392
+ },
393
+ 'thead th': {
394
+ paddingInlineEnd: em(8, 14),
395
+ paddingBottom: em(8, 14),
396
+ paddingInlineStart: em(8, 14),
397
+ },
398
+ 'thead th:first-child': {
399
+ paddingInlineStart: '0',
400
+ },
401
+ 'thead th:last-child': {
402
+ paddingInlineEnd: '0',
403
+ },
404
+ 'tbody td, tfoot td': {
405
+ paddingTop: em(8, 14),
406
+ paddingInlineEnd: em(8, 14),
407
+ paddingBottom: em(8, 14),
408
+ paddingInlineStart: em(8, 14),
409
+ },
410
+ 'tbody td:first-child, tfoot td:first-child': {
411
+ paddingInlineStart: '0',
412
+ },
413
+ 'tbody td:last-child, tfoot td:last-child': {
414
+ paddingInlineEnd: '0',
415
+ },
416
+ figure: {
417
+ marginTop: em(32, 16),
418
+ marginBottom: em(32, 16),
419
+ },
420
+ 'figure > *': {
421
+ marginTop: '0',
422
+ marginBottom: '0',
423
+ },
424
+ figcaption: {
425
+ fontSize: em(14, 16),
426
+ lineHeight: round(20 / 14),
427
+ marginTop: em(12, 14),
428
+ },
429
+ },
430
+ {
431
+ '> :first-child': {
432
+ marginTop: '0',
433
+ },
434
+ '> :last-child': {
435
+ marginBottom: '0',
436
+ },
437
+ },
438
+ ],
439
+ },
440
+ lg: {
441
+ css: [
442
+ {
443
+ fontSize: rem(18),
444
+ lineHeight: round(32 / 18),
445
+ p: {
446
+ marginTop: em(24, 18),
447
+ marginBottom: em(24, 18),
448
+ },
449
+ '[class~="lead"]': {
450
+ fontSize: em(22, 18),
451
+ lineHeight: round(32 / 22),
452
+ marginTop: em(24, 22),
453
+ marginBottom: em(24, 22),
454
+ },
455
+ blockquote: {
456
+ marginTop: em(40, 24),
457
+ marginBottom: em(40, 24),
458
+ paddingInlineStart: em(24, 24),
459
+ },
460
+ h1: {
461
+ fontSize: em(48, 18),
462
+ marginTop: '0',
463
+ marginBottom: em(40, 48),
464
+ lineHeight: round(48 / 48),
465
+ },
466
+ h2: {
467
+ fontSize: em(30, 18),
468
+ marginTop: em(56, 30),
469
+ marginBottom: em(32, 30),
470
+ lineHeight: round(40 / 30),
471
+ },
472
+ h3: {
473
+ fontSize: em(24, 18),
474
+ marginTop: em(40, 24),
475
+ marginBottom: em(16, 24),
476
+ lineHeight: round(36 / 24),
477
+ },
478
+ h4: {
479
+ marginTop: em(32, 18),
480
+ marginBottom: em(8, 18),
481
+ lineHeight: round(28 / 18),
482
+ },
483
+ img: {
484
+ marginTop: em(32, 18),
485
+ marginBottom: em(32, 18),
486
+ },
487
+ picture: {
488
+ marginTop: em(32, 18),
489
+ marginBottom: em(32, 18),
490
+ },
491
+ 'picture > img': {
492
+ marginTop: '0',
493
+ marginBottom: '0',
494
+ },
495
+ video: {
496
+ marginTop: em(32, 18),
497
+ marginBottom: em(32, 18),
498
+ },
499
+ kbd: {
500
+ fontSize: em(16, 18),
501
+ borderRadius: rem(5),
502
+ paddingTop: em(4, 18),
503
+ paddingInlineEnd: em(8, 18),
504
+ paddingBottom: em(4, 18),
505
+ paddingInlineStart: em(8, 18),
506
+ },
507
+ code: {
508
+ fontSize: em(16, 18),
509
+ },
510
+ 'h2 code': {
511
+ fontSize: em(26, 30),
512
+ },
513
+ 'h3 code': {
514
+ fontSize: em(21, 24),
515
+ },
516
+ pre: {
517
+ fontSize: em(16, 18),
518
+ lineHeight: round(28 / 16),
519
+ marginTop: em(32, 16),
520
+ marginBottom: em(32, 16),
521
+ borderRadius: rem(6),
522
+ paddingTop: em(16, 16),
523
+ paddingInlineEnd: em(24, 16),
524
+ paddingBottom: em(16, 16),
525
+ paddingInlineStart: em(24, 16),
526
+ },
527
+ ol: {
528
+ marginTop: em(24, 18),
529
+ marginBottom: em(24, 18),
530
+ paddingInlineStart: em(28, 18),
531
+ },
532
+ ul: {
533
+ marginTop: em(24, 18),
534
+ marginBottom: em(24, 18),
535
+ paddingInlineStart: em(28, 18),
536
+ },
537
+ li: {
538
+ marginTop: em(12, 18),
539
+ marginBottom: em(12, 18),
540
+ },
541
+ 'ol > li': {
542
+ paddingInlineStart: em(8, 18),
543
+ },
544
+ 'ul > li': {
545
+ paddingInlineStart: em(8, 18),
546
+ },
547
+ '> ul > li p': {
548
+ marginTop: em(16, 18),
549
+ marginBottom: em(16, 18),
550
+ },
551
+ '> ul > li > p:first-child': {
552
+ marginTop: em(24, 18),
553
+ },
554
+ '> ul > li > p:last-child': {
555
+ marginBottom: em(24, 18),
556
+ },
557
+ '> ol > li > p:first-child': {
558
+ marginTop: em(24, 18),
559
+ },
560
+ '> ol > li > p:last-child': {
561
+ marginBottom: em(24, 18),
562
+ },
563
+ 'ul ul, ul ol, ol ul, ol ol': {
564
+ marginTop: em(16, 18),
565
+ marginBottom: em(16, 18),
566
+ },
567
+ dl: {
568
+ marginTop: em(24, 18),
569
+ marginBottom: em(24, 18),
570
+ },
571
+ dt: {
572
+ marginTop: em(24, 18),
573
+ },
574
+ dd: {
575
+ marginTop: em(12, 18),
576
+ paddingInlineStart: em(28, 18),
577
+ },
578
+ hr: {
579
+ marginTop: em(56, 18),
580
+ marginBottom: em(56, 18),
581
+ },
582
+ 'hr + *': {
583
+ marginTop: '0',
584
+ },
585
+ 'h2 + *': {
586
+ marginTop: '0',
587
+ },
588
+ 'h3 + *': {
589
+ marginTop: '0',
590
+ },
591
+ 'h4 + *': {
592
+ marginTop: '0',
593
+ },
594
+ table: {
595
+ fontSize: em(16, 18),
596
+ lineHeight: round(24 / 16),
597
+ },
598
+ 'thead th': {
599
+ paddingInlineEnd: em(12, 16),
600
+ paddingBottom: em(12, 16),
601
+ paddingInlineStart: em(12, 16),
602
+ },
603
+ 'thead th:first-child': {
604
+ paddingInlineStart: '0',
605
+ },
606
+ 'thead th:last-child': {
607
+ paddingInlineEnd: '0',
608
+ },
609
+ 'tbody td, tfoot td': {
610
+ paddingTop: em(12, 16),
611
+ paddingInlineEnd: em(12, 16),
612
+ paddingBottom: em(12, 16),
613
+ paddingInlineStart: em(12, 16),
614
+ },
615
+ 'tbody td:first-child, tfoot td:first-child': {
616
+ paddingInlineStart: '0',
617
+ },
618
+ 'tbody td:last-child, tfoot td:last-child': {
619
+ paddingInlineEnd: '0',
620
+ },
621
+ figure: {
622
+ marginTop: em(32, 18),
623
+ marginBottom: em(32, 18),
624
+ },
625
+ 'figure > *': {
626
+ marginTop: '0',
627
+ marginBottom: '0',
628
+ },
629
+ figcaption: {
630
+ fontSize: em(16, 18),
631
+ lineHeight: round(24 / 16),
632
+ marginTop: em(16, 16),
633
+ },
634
+ },
635
+ {
636
+ '> :first-child': {
637
+ marginTop: '0',
638
+ },
639
+ '> :last-child': {
640
+ marginBottom: '0',
641
+ },
642
+ },
643
+ ],
644
+ },
645
+ xl: {
646
+ css: [
647
+ {
648
+ fontSize: rem(20),
649
+ lineHeight: round(36 / 20),
650
+ p: {
651
+ marginTop: em(24, 20),
652
+ marginBottom: em(24, 20),
653
+ },
654
+ '[class~="lead"]': {
655
+ fontSize: em(24, 20),
656
+ lineHeight: round(36 / 24),
657
+ marginTop: em(24, 24),
658
+ marginBottom: em(24, 24),
659
+ },
660
+ blockquote: {
661
+ marginTop: em(48, 30),
662
+ marginBottom: em(48, 30),
663
+ paddingInlineStart: em(32, 30),
664
+ },
665
+ h1: {
666
+ fontSize: em(56, 20),
667
+ marginTop: '0',
668
+ marginBottom: em(48, 56),
669
+ lineHeight: round(56 / 56),
670
+ },
671
+ h2: {
672
+ fontSize: em(36, 20),
673
+ marginTop: em(56, 36),
674
+ marginBottom: em(32, 36),
675
+ lineHeight: round(40 / 36),
676
+ },
677
+ h3: {
678
+ fontSize: em(30, 20),
679
+ marginTop: em(48, 30),
680
+ marginBottom: em(20, 30),
681
+ lineHeight: round(40 / 30),
682
+ },
683
+ h4: {
684
+ marginTop: em(36, 20),
685
+ marginBottom: em(12, 20),
686
+ lineHeight: round(32 / 20),
687
+ },
688
+ img: {
689
+ marginTop: em(40, 20),
690
+ marginBottom: em(40, 20),
691
+ },
692
+ picture: {
693
+ marginTop: em(40, 20),
694
+ marginBottom: em(40, 20),
695
+ },
696
+ 'picture > img': {
697
+ marginTop: '0',
698
+ marginBottom: '0',
699
+ },
700
+ video: {
701
+ marginTop: em(40, 20),
702
+ marginBottom: em(40, 20),
703
+ },
704
+ kbd: {
705
+ fontSize: em(18, 20),
706
+ borderRadius: rem(5),
707
+ paddingTop: em(5, 20),
708
+ paddingInlineEnd: em(8, 20),
709
+ paddingBottom: em(5, 20),
710
+ paddingInlineStart: em(8, 20),
711
+ },
712
+ code: {
713
+ fontSize: em(18, 20),
714
+ },
715
+ 'h2 code': {
716
+ fontSize: em(31, 36),
717
+ },
718
+ 'h3 code': {
719
+ fontSize: em(27, 30),
720
+ },
721
+ pre: {
722
+ fontSize: em(18, 20),
723
+ lineHeight: round(32 / 18),
724
+ marginTop: em(36, 18),
725
+ marginBottom: em(36, 18),
726
+ borderRadius: rem(8),
727
+ paddingTop: em(20, 18),
728
+ paddingInlineEnd: em(24, 18),
729
+ paddingBottom: em(20, 18),
730
+ paddingInlineStart: em(24, 18),
731
+ },
732
+ ol: {
733
+ marginTop: em(24, 20),
734
+ marginBottom: em(24, 20),
735
+ paddingInlineStart: em(32, 20),
736
+ },
737
+ ul: {
738
+ marginTop: em(24, 20),
739
+ marginBottom: em(24, 20),
740
+ paddingInlineStart: em(32, 20),
741
+ },
742
+ li: {
743
+ marginTop: em(12, 20),
744
+ marginBottom: em(12, 20),
745
+ },
746
+ 'ol > li': {
747
+ paddingInlineStart: em(8, 20),
748
+ },
749
+ 'ul > li': {
750
+ paddingInlineStart: em(8, 20),
751
+ },
752
+ '> ul > li p': {
753
+ marginTop: em(16, 20),
754
+ marginBottom: em(16, 20),
755
+ },
756
+ '> ul > li > p:first-child': {
757
+ marginTop: em(24, 20),
758
+ },
759
+ '> ul > li > p:last-child': {
760
+ marginBottom: em(24, 20),
761
+ },
762
+ '> ol > li > p:first-child': {
763
+ marginTop: em(24, 20),
764
+ },
765
+ '> ol > li > p:last-child': {
766
+ marginBottom: em(24, 20),
767
+ },
768
+ 'ul ul, ul ol, ol ul, ol ol': {
769
+ marginTop: em(16, 20),
770
+ marginBottom: em(16, 20),
771
+ },
772
+ dl: {
773
+ marginTop: em(24, 20),
774
+ marginBottom: em(24, 20),
775
+ },
776
+ dt: {
777
+ marginTop: em(24, 20),
778
+ },
779
+ dd: {
780
+ marginTop: em(12, 20),
781
+ paddingInlineStart: em(32, 20),
782
+ },
783
+ hr: {
784
+ marginTop: em(56, 20),
785
+ marginBottom: em(56, 20),
786
+ },
787
+ 'hr + *': {
788
+ marginTop: '0',
789
+ },
790
+ 'h2 + *': {
791
+ marginTop: '0',
792
+ },
793
+ 'h3 + *': {
794
+ marginTop: '0',
795
+ },
796
+ 'h4 + *': {
797
+ marginTop: '0',
798
+ },
799
+ table: {
800
+ fontSize: em(18, 20),
801
+ lineHeight: round(28 / 18),
802
+ },
803
+ 'thead th': {
804
+ paddingInlineEnd: em(12, 18),
805
+ paddingBottom: em(16, 18),
806
+ paddingInlineStart: em(12, 18),
807
+ },
808
+ 'thead th:first-child': {
809
+ paddingInlineStart: '0',
810
+ },
811
+ 'thead th:last-child': {
812
+ paddingInlineEnd: '0',
813
+ },
814
+ 'tbody td, tfoot td': {
815
+ paddingTop: em(16, 18),
816
+ paddingInlineEnd: em(12, 18),
817
+ paddingBottom: em(16, 18),
818
+ paddingInlineStart: em(12, 18),
819
+ },
820
+ 'tbody td:first-child, tfoot td:first-child': {
821
+ paddingInlineStart: '0',
822
+ },
823
+ 'tbody td:last-child, tfoot td:last-child': {
824
+ paddingInlineEnd: '0',
825
+ },
826
+ figure: {
827
+ marginTop: em(40, 20),
828
+ marginBottom: em(40, 20),
829
+ },
830
+ 'figure > *': {
831
+ marginTop: '0',
832
+ marginBottom: '0',
833
+ },
834
+ figcaption: {
835
+ fontSize: em(18, 20),
836
+ lineHeight: round(28 / 18),
837
+ marginTop: em(18, 18),
838
+ },
839
+ },
840
+ {
841
+ '> :first-child': {
842
+ marginTop: '0',
843
+ },
844
+ '> :last-child': {
845
+ marginBottom: '0',
846
+ },
847
+ },
848
+ ],
849
+ },
850
+ '2xl': {
851
+ css: [
852
+ {
853
+ fontSize: rem(24),
854
+ lineHeight: round(40 / 24),
855
+ p: {
856
+ marginTop: em(32, 24),
857
+ marginBottom: em(32, 24),
858
+ },
859
+ '[class~="lead"]': {
860
+ fontSize: em(30, 24),
861
+ lineHeight: round(44 / 30),
862
+ marginTop: em(32, 30),
863
+ marginBottom: em(32, 30),
864
+ },
865
+ blockquote: {
866
+ marginTop: em(64, 36),
867
+ marginBottom: em(64, 36),
868
+ paddingInlineStart: em(40, 36),
869
+ },
870
+ h1: {
871
+ fontSize: em(64, 24),
872
+ marginTop: '0',
873
+ marginBottom: em(56, 64),
874
+ lineHeight: round(64 / 64),
875
+ },
876
+ h2: {
877
+ fontSize: em(48, 24),
878
+ marginTop: em(72, 48),
879
+ marginBottom: em(40, 48),
880
+ lineHeight: round(52 / 48),
881
+ },
882
+ h3: {
883
+ fontSize: em(36, 24),
884
+ marginTop: em(56, 36),
885
+ marginBottom: em(24, 36),
886
+ lineHeight: round(44 / 36),
887
+ },
888
+ h4: {
889
+ marginTop: em(40, 24),
890
+ marginBottom: em(16, 24),
891
+ lineHeight: round(36 / 24),
892
+ },
893
+ img: {
894
+ marginTop: em(48, 24),
895
+ marginBottom: em(48, 24),
896
+ },
897
+ picture: {
898
+ marginTop: em(48, 24),
899
+ marginBottom: em(48, 24),
900
+ },
901
+ 'picture > img': {
902
+ marginTop: '0',
903
+ marginBottom: '0',
904
+ },
905
+ video: {
906
+ marginTop: em(48, 24),
907
+ marginBottom: em(48, 24),
908
+ },
909
+ kbd: {
910
+ fontSize: em(20, 24),
911
+ borderRadius: rem(6),
912
+ paddingTop: em(6, 24),
913
+ paddingInlineEnd: em(8, 24),
914
+ paddingBottom: em(6, 24),
915
+ paddingInlineStart: em(8, 24),
916
+ },
917
+ code: {
918
+ fontSize: em(20, 24),
919
+ },
920
+ 'h2 code': {
921
+ fontSize: em(42, 48),
922
+ },
923
+ 'h3 code': {
924
+ fontSize: em(32, 36),
925
+ },
926
+ pre: {
927
+ fontSize: em(20, 24),
928
+ lineHeight: round(36 / 20),
929
+ marginTop: em(40, 20),
930
+ marginBottom: em(40, 20),
931
+ borderRadius: rem(8),
932
+ paddingTop: em(24, 20),
933
+ paddingInlineEnd: em(32, 20),
934
+ paddingBottom: em(24, 20),
935
+ paddingInlineStart: em(32, 20),
936
+ },
937
+ ol: {
938
+ marginTop: em(32, 24),
939
+ marginBottom: em(32, 24),
940
+ paddingInlineStart: em(38, 24),
941
+ },
942
+ ul: {
943
+ marginTop: em(32, 24),
944
+ marginBottom: em(32, 24),
945
+ paddingInlineStart: em(38, 24),
946
+ },
947
+ li: {
948
+ marginTop: em(12, 24),
949
+ marginBottom: em(12, 24),
950
+ },
951
+ 'ol > li': {
952
+ paddingInlineStart: em(10, 24),
953
+ },
954
+ 'ul > li': {
955
+ paddingInlineStart: em(10, 24),
956
+ },
957
+ '> ul > li p': {
958
+ marginTop: em(20, 24),
959
+ marginBottom: em(20, 24),
960
+ },
961
+ '> ul > li > p:first-child': {
962
+ marginTop: em(32, 24),
963
+ },
964
+ '> ul > li > p:last-child': {
965
+ marginBottom: em(32, 24),
966
+ },
967
+ '> ol > li > p:first-child': {
968
+ marginTop: em(32, 24),
969
+ },
970
+ '> ol > li > p:last-child': {
971
+ marginBottom: em(32, 24),
972
+ },
973
+ 'ul ul, ul ol, ol ul, ol ol': {
974
+ marginTop: em(16, 24),
975
+ marginBottom: em(16, 24),
976
+ },
977
+ dl: {
978
+ marginTop: em(32, 24),
979
+ marginBottom: em(32, 24),
980
+ },
981
+ dt: {
982
+ marginTop: em(32, 24),
983
+ },
984
+ dd: {
985
+ marginTop: em(12, 24),
986
+ paddingInlineStart: em(38, 24),
987
+ },
988
+ hr: {
989
+ marginTop: em(72, 24),
990
+ marginBottom: em(72, 24),
991
+ },
992
+ 'hr + *': {
993
+ marginTop: '0',
994
+ },
995
+ 'h2 + *': {
996
+ marginTop: '0',
997
+ },
998
+ 'h3 + *': {
999
+ marginTop: '0',
1000
+ },
1001
+ 'h4 + *': {
1002
+ marginTop: '0',
1003
+ },
1004
+ table: {
1005
+ fontSize: em(20, 24),
1006
+ lineHeight: round(28 / 20),
1007
+ },
1008
+ 'thead th': {
1009
+ paddingInlineEnd: em(12, 20),
1010
+ paddingBottom: em(16, 20),
1011
+ paddingInlineStart: em(12, 20),
1012
+ },
1013
+ 'thead th:first-child': {
1014
+ paddingInlineStart: '0',
1015
+ },
1016
+ 'thead th:last-child': {
1017
+ paddingInlineEnd: '0',
1018
+ },
1019
+ 'tbody td, tfoot td': {
1020
+ paddingTop: em(16, 20),
1021
+ paddingInlineEnd: em(12, 20),
1022
+ paddingBottom: em(16, 20),
1023
+ paddingInlineStart: em(12, 20),
1024
+ },
1025
+ 'tbody td:first-child, tfoot td:first-child': {
1026
+ paddingInlineStart: '0',
1027
+ },
1028
+ 'tbody td:last-child, tfoot td:last-child': {
1029
+ paddingInlineEnd: '0',
1030
+ },
1031
+ figure: {
1032
+ marginTop: em(48, 24),
1033
+ marginBottom: em(48, 24),
1034
+ },
1035
+ 'figure > *': {
1036
+ marginTop: '0',
1037
+ marginBottom: '0',
1038
+ },
1039
+ figcaption: {
1040
+ fontSize: em(20, 24),
1041
+ lineHeight: round(32 / 20),
1042
+ marginTop: em(20, 20),
1043
+ },
1044
+ },
1045
+ {
1046
+ '> :first-child': {
1047
+ marginTop: '0',
1048
+ },
1049
+ '> :last-child': {
1050
+ marginBottom: '0',
1051
+ },
1052
+ },
1053
+ ],
1054
+ },
1055
+
1056
+ // Gray color themes
1057
+
1058
+ slate: {
1059
+ css: {
1060
+ '--tw-prose-body': colors.slate[700],
1061
+ '--tw-prose-headings': colors.slate[900],
1062
+ '--tw-prose-lead': colors.slate[600],
1063
+ '--tw-prose-links': colors.slate[900],
1064
+ '--tw-prose-bold': colors.slate[900],
1065
+ '--tw-prose-counters': colors.slate[500],
1066
+ '--tw-prose-bullets': colors.slate[300],
1067
+ '--tw-prose-hr': colors.slate[200],
1068
+ '--tw-prose-quotes': colors.slate[900],
1069
+ '--tw-prose-quote-borders': colors.slate[200],
1070
+ '--tw-prose-captions': colors.slate[500],
1071
+ '--tw-prose-kbd': colors.slate[900],
1072
+ '--tw-prose-kbd-shadows': opacity(colors.slate[900], '10%'),
1073
+ '--tw-prose-code': colors.slate[900],
1074
+ '--tw-prose-pre-code': colors.slate[200],
1075
+ '--tw-prose-pre-bg': colors.slate[800],
1076
+ '--tw-prose-th-borders': colors.slate[300],
1077
+ '--tw-prose-td-borders': colors.slate[200],
1078
+ '--tw-prose-invert-body': colors.slate[300],
1079
+ '--tw-prose-invert-headings': colors.white,
1080
+ '--tw-prose-invert-lead': colors.slate[400],
1081
+ '--tw-prose-invert-links': colors.white,
1082
+ '--tw-prose-invert-bold': colors.white,
1083
+ '--tw-prose-invert-counters': colors.slate[400],
1084
+ '--tw-prose-invert-bullets': colors.slate[600],
1085
+ '--tw-prose-invert-hr': colors.slate[700],
1086
+ '--tw-prose-invert-quotes': colors.slate[100],
1087
+ '--tw-prose-invert-quote-borders': colors.slate[700],
1088
+ '--tw-prose-invert-captions': colors.slate[400],
1089
+ '--tw-prose-invert-kbd': colors.white,
1090
+ '--tw-prose-invert-kbd-shadows': opacity(colors.white, '10%'),
1091
+ '--tw-prose-invert-code': colors.white,
1092
+ '--tw-prose-invert-pre-code': colors.slate[300],
1093
+ '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
1094
+ '--tw-prose-invert-th-borders': colors.slate[600],
1095
+ '--tw-prose-invert-td-borders': colors.slate[700],
1096
+ },
1097
+ },
1098
+
1099
+ gray: {
1100
+ css: {
1101
+ '--tw-prose-body': colors.gray[700],
1102
+ '--tw-prose-headings': colors.gray[900],
1103
+ '--tw-prose-lead': colors.gray[600],
1104
+ '--tw-prose-links': colors.gray[900],
1105
+ '--tw-prose-bold': colors.gray[900],
1106
+ '--tw-prose-counters': colors.gray[500],
1107
+ '--tw-prose-bullets': colors.gray[300],
1108
+ '--tw-prose-hr': colors.gray[200],
1109
+ '--tw-prose-quotes': colors.gray[900],
1110
+ '--tw-prose-quote-borders': colors.gray[200],
1111
+ '--tw-prose-captions': colors.gray[500],
1112
+ '--tw-prose-kbd': colors.gray[900],
1113
+ '--tw-prose-kbd-shadows': opacity(colors.gray[900], '10%'),
1114
+ '--tw-prose-code': colors.gray[900],
1115
+ '--tw-prose-pre-code': colors.gray[200],
1116
+ '--tw-prose-pre-bg': colors.gray[800],
1117
+ '--tw-prose-th-borders': colors.gray[300],
1118
+ '--tw-prose-td-borders': colors.gray[200],
1119
+ '--tw-prose-invert-body': colors.gray[300],
1120
+ '--tw-prose-invert-headings': colors.white,
1121
+ '--tw-prose-invert-lead': colors.gray[400],
1122
+ '--tw-prose-invert-links': colors.white,
1123
+ '--tw-prose-invert-bold': colors.white,
1124
+ '--tw-prose-invert-counters': colors.gray[400],
1125
+ '--tw-prose-invert-bullets': colors.gray[600],
1126
+ '--tw-prose-invert-hr': colors.gray[700],
1127
+ '--tw-prose-invert-quotes': colors.gray[100],
1128
+ '--tw-prose-invert-quote-borders': colors.gray[700],
1129
+ '--tw-prose-invert-captions': colors.gray[400],
1130
+ '--tw-prose-invert-kbd': colors.white,
1131
+ '--tw-prose-invert-kbd-shadows': opacity(colors.white, '10%'),
1132
+ '--tw-prose-invert-code': colors.white,
1133
+ '--tw-prose-invert-pre-code': colors.gray[300],
1134
+ '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
1135
+ '--tw-prose-invert-th-borders': colors.gray[600],
1136
+ '--tw-prose-invert-td-borders': colors.gray[700],
1137
+ },
1138
+ },
1139
+
1140
+ zinc: {
1141
+ css: {
1142
+ '--tw-prose-body': colors.zinc[700],
1143
+ '--tw-prose-headings': colors.zinc[900],
1144
+ '--tw-prose-lead': colors.zinc[600],
1145
+ '--tw-prose-links': colors.zinc[900],
1146
+ '--tw-prose-bold': colors.zinc[900],
1147
+ '--tw-prose-counters': colors.zinc[500],
1148
+ '--tw-prose-bullets': colors.zinc[300],
1149
+ '--tw-prose-hr': colors.zinc[200],
1150
+ '--tw-prose-quotes': colors.zinc[900],
1151
+ '--tw-prose-quote-borders': colors.zinc[200],
1152
+ '--tw-prose-captions': colors.zinc[500],
1153
+ '--tw-prose-kbd': colors.zinc[900],
1154
+ '--tw-prose-kbd-shadows': opacity(colors.zinc[900], '10%'),
1155
+ '--tw-prose-code': colors.zinc[900],
1156
+ '--tw-prose-pre-code': colors.zinc[200],
1157
+ '--tw-prose-pre-bg': colors.zinc[800],
1158
+ '--tw-prose-th-borders': colors.zinc[300],
1159
+ '--tw-prose-td-borders': colors.zinc[200],
1160
+ '--tw-prose-invert-body': colors.zinc[300],
1161
+ '--tw-prose-invert-headings': colors.white,
1162
+ '--tw-prose-invert-lead': colors.zinc[400],
1163
+ '--tw-prose-invert-links': colors.white,
1164
+ '--tw-prose-invert-bold': colors.white,
1165
+ '--tw-prose-invert-counters': colors.zinc[400],
1166
+ '--tw-prose-invert-bullets': colors.zinc[600],
1167
+ '--tw-prose-invert-hr': colors.zinc[700],
1168
+ '--tw-prose-invert-quotes': colors.zinc[100],
1169
+ '--tw-prose-invert-quote-borders': colors.zinc[700],
1170
+ '--tw-prose-invert-captions': colors.zinc[400],
1171
+ '--tw-prose-invert-kbd': colors.white,
1172
+ '--tw-prose-invert-kbd-shadows': opacity(colors.white, '10%'),
1173
+ '--tw-prose-invert-code': colors.white,
1174
+ '--tw-prose-invert-pre-code': colors.zinc[300],
1175
+ '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
1176
+ '--tw-prose-invert-th-borders': colors.zinc[600],
1177
+ '--tw-prose-invert-td-borders': colors.zinc[700],
1178
+ },
1179
+ },
1180
+
1181
+ neutral: {
1182
+ css: {
1183
+ '--tw-prose-body': colors.neutral[700],
1184
+ '--tw-prose-headings': colors.neutral[900],
1185
+ '--tw-prose-lead': colors.neutral[600],
1186
+ '--tw-prose-links': colors.neutral[900],
1187
+ '--tw-prose-bold': colors.neutral[900],
1188
+ '--tw-prose-counters': colors.neutral[500],
1189
+ '--tw-prose-bullets': colors.neutral[300],
1190
+ '--tw-prose-hr': colors.neutral[200],
1191
+ '--tw-prose-quotes': colors.neutral[900],
1192
+ '--tw-prose-quote-borders': colors.neutral[200],
1193
+ '--tw-prose-captions': colors.neutral[500],
1194
+ '--tw-prose-kbd': colors.neutral[900],
1195
+ '--tw-prose-kbd-shadows': opacity(colors.neutral[900], '10%'),
1196
+ '--tw-prose-code': colors.neutral[900],
1197
+ '--tw-prose-pre-code': colors.neutral[200],
1198
+ '--tw-prose-pre-bg': colors.neutral[800],
1199
+ '--tw-prose-th-borders': colors.neutral[300],
1200
+ '--tw-prose-td-borders': colors.neutral[200],
1201
+ '--tw-prose-invert-body': colors.neutral[300],
1202
+ '--tw-prose-invert-headings': colors.white,
1203
+ '--tw-prose-invert-lead': colors.neutral[400],
1204
+ '--tw-prose-invert-links': colors.white,
1205
+ '--tw-prose-invert-bold': colors.white,
1206
+ '--tw-prose-invert-counters': colors.neutral[400],
1207
+ '--tw-prose-invert-bullets': colors.neutral[600],
1208
+ '--tw-prose-invert-hr': colors.neutral[700],
1209
+ '--tw-prose-invert-quotes': colors.neutral[100],
1210
+ '--tw-prose-invert-quote-borders': colors.neutral[700],
1211
+ '--tw-prose-invert-captions': colors.neutral[400],
1212
+ '--tw-prose-invert-kbd': colors.white,
1213
+ '--tw-prose-invert-kbd-shadows': opacity(colors.white, '10%'),
1214
+ '--tw-prose-invert-code': colors.white,
1215
+ '--tw-prose-invert-pre-code': colors.neutral[300],
1216
+ '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
1217
+ '--tw-prose-invert-th-borders': colors.neutral[600],
1218
+ '--tw-prose-invert-td-borders': colors.neutral[700],
1219
+ },
1220
+ },
1221
+
1222
+ stone: {
1223
+ css: {
1224
+ '--tw-prose-body': colors.stone[700],
1225
+ '--tw-prose-headings': colors.stone[900],
1226
+ '--tw-prose-lead': colors.stone[600],
1227
+ '--tw-prose-links': colors.stone[900],
1228
+ '--tw-prose-bold': colors.stone[900],
1229
+ '--tw-prose-counters': colors.stone[500],
1230
+ '--tw-prose-bullets': colors.stone[300],
1231
+ '--tw-prose-hr': colors.stone[200],
1232
+ '--tw-prose-quotes': colors.stone[900],
1233
+ '--tw-prose-quote-borders': colors.stone[200],
1234
+ '--tw-prose-captions': colors.stone[500],
1235
+ '--tw-prose-kbd': colors.stone[900],
1236
+ '--tw-prose-kbd-shadows': opacity(colors.stone[900], '10%'),
1237
+ '--tw-prose-code': colors.stone[900],
1238
+ '--tw-prose-pre-code': colors.stone[200],
1239
+ '--tw-prose-pre-bg': colors.stone[800],
1240
+ '--tw-prose-th-borders': colors.stone[300],
1241
+ '--tw-prose-td-borders': colors.stone[200],
1242
+ '--tw-prose-invert-body': colors.stone[300],
1243
+ '--tw-prose-invert-headings': colors.white,
1244
+ '--tw-prose-invert-lead': colors.stone[400],
1245
+ '--tw-prose-invert-links': colors.white,
1246
+ '--tw-prose-invert-bold': colors.white,
1247
+ '--tw-prose-invert-counters': colors.stone[400],
1248
+ '--tw-prose-invert-bullets': colors.stone[600],
1249
+ '--tw-prose-invert-hr': colors.stone[700],
1250
+ '--tw-prose-invert-quotes': colors.stone[100],
1251
+ '--tw-prose-invert-quote-borders': colors.stone[700],
1252
+ '--tw-prose-invert-captions': colors.stone[400],
1253
+ '--tw-prose-invert-kbd': colors.white,
1254
+ '--tw-prose-invert-kbd-shadows': opacity(colors.white, '10%'),
1255
+ '--tw-prose-invert-code': colors.white,
1256
+ '--tw-prose-invert-pre-code': colors.stone[300],
1257
+ '--tw-prose-invert-pre-bg': 'rgb(0 0 0 / 50%)',
1258
+ '--tw-prose-invert-th-borders': colors.stone[600],
1259
+ '--tw-prose-invert-td-borders': colors.stone[700],
1260
+ },
1261
+ },
1262
+
1263
+ // Link-only themes (for backward compatibility)
1264
+
1265
+ red: {
1266
+ css: {
1267
+ '--tw-prose-links': colors.red[600],
1268
+ '--tw-prose-invert-links': colors.red[500],
1269
+ },
1270
+ },
1271
+
1272
+ orange: {
1273
+ css: {
1274
+ '--tw-prose-links': colors.orange[600],
1275
+ '--tw-prose-invert-links': colors.orange[500],
1276
+ },
1277
+ },
1278
+
1279
+ amber: {
1280
+ css: {
1281
+ '--tw-prose-links': colors.amber[600],
1282
+ '--tw-prose-invert-links': colors.amber[500],
1283
+ },
1284
+ },
1285
+
1286
+ yellow: {
1287
+ css: {
1288
+ '--tw-prose-links': colors.yellow[600],
1289
+ '--tw-prose-invert-links': colors.yellow[500],
1290
+ },
1291
+ },
1292
+
1293
+ lime: {
1294
+ css: {
1295
+ '--tw-prose-links': colors.lime[600],
1296
+ '--tw-prose-invert-links': colors.lime[500],
1297
+ },
1298
+ },
1299
+
1300
+ green: {
1301
+ css: {
1302
+ '--tw-prose-links': colors.green[600],
1303
+ '--tw-prose-invert-links': colors.green[500],
1304
+ },
1305
+ },
1306
+
1307
+ emerald: {
1308
+ css: {
1309
+ '--tw-prose-links': colors.emerald[600],
1310
+ '--tw-prose-invert-links': colors.emerald[500],
1311
+ },
1312
+ },
1313
+
1314
+ teal: {
1315
+ css: {
1316
+ '--tw-prose-links': colors.teal[600],
1317
+ '--tw-prose-invert-links': colors.teal[500],
1318
+ },
1319
+ },
1320
+
1321
+ cyan: {
1322
+ css: {
1323
+ '--tw-prose-links': colors.cyan[600],
1324
+ '--tw-prose-invert-links': colors.cyan[500],
1325
+ },
1326
+ },
1327
+
1328
+ sky: {
1329
+ css: {
1330
+ '--tw-prose-links': colors.sky[600],
1331
+ '--tw-prose-invert-links': colors.sky[500],
1332
+ },
1333
+ },
1334
+
1335
+ blue: {
1336
+ css: {
1337
+ '--tw-prose-links': colors.blue[600],
1338
+ '--tw-prose-invert-links': colors.blue[500],
1339
+ },
1340
+ },
1341
+
1342
+ indigo: {
1343
+ css: {
1344
+ '--tw-prose-links': colors.indigo[600],
1345
+ '--tw-prose-invert-links': colors.indigo[500],
1346
+ },
1347
+ },
1348
+
1349
+ violet: {
1350
+ css: {
1351
+ '--tw-prose-links': colors.violet[600],
1352
+ '--tw-prose-invert-links': colors.violet[500],
1353
+ },
1354
+ },
1355
+
1356
+ purple: {
1357
+ css: {
1358
+ '--tw-prose-links': colors.purple[600],
1359
+ '--tw-prose-invert-links': colors.purple[500],
1360
+ },
1361
+ },
1362
+
1363
+ fuchsia: {
1364
+ css: {
1365
+ '--tw-prose-links': colors.fuchsia[600],
1366
+ '--tw-prose-invert-links': colors.fuchsia[500],
1367
+ },
1368
+ },
1369
+
1370
+ pink: {
1371
+ css: {
1372
+ '--tw-prose-links': colors.pink[600],
1373
+ '--tw-prose-invert-links': colors.pink[500],
1374
+ },
1375
+ },
1376
+
1377
+ rose: {
1378
+ css: {
1379
+ '--tw-prose-links': colors.rose[600],
1380
+ '--tw-prose-invert-links': colors.rose[500],
1381
+ },
1382
+ },
1383
+
1384
+ // Invert (for dark mode)
1385
+ invert: {
1386
+ css: {
1387
+ '--tw-prose-body': 'var(--tw-prose-invert-body)',
1388
+ '--tw-prose-headings': 'var(--tw-prose-invert-headings)',
1389
+ '--tw-prose-lead': 'var(--tw-prose-invert-lead)',
1390
+ '--tw-prose-links': 'var(--tw-prose-invert-links)',
1391
+ '--tw-prose-bold': 'var(--tw-prose-invert-bold)',
1392
+ '--tw-prose-counters': 'var(--tw-prose-invert-counters)',
1393
+ '--tw-prose-bullets': 'var(--tw-prose-invert-bullets)',
1394
+ '--tw-prose-hr': 'var(--tw-prose-invert-hr)',
1395
+ '--tw-prose-quotes': 'var(--tw-prose-invert-quotes)',
1396
+ '--tw-prose-quote-borders': 'var(--tw-prose-invert-quote-borders)',
1397
+ '--tw-prose-captions': 'var(--tw-prose-invert-captions)',
1398
+ '--tw-prose-kbd': 'var(--tw-prose-invert-kbd)',
1399
+ '--tw-prose-kbd-shadows': 'var(--tw-prose-invert-kbd-shadows)',
1400
+ '--tw-prose-code': 'var(--tw-prose-invert-code)',
1401
+ '--tw-prose-pre-code': 'var(--tw-prose-invert-pre-code)',
1402
+ '--tw-prose-pre-bg': 'var(--tw-prose-invert-pre-bg)',
1403
+ '--tw-prose-th-borders': 'var(--tw-prose-invert-th-borders)',
1404
+ '--tw-prose-td-borders': 'var(--tw-prose-invert-td-borders)',
1405
+ },
1406
+ },
1407
+ }
1408
+
1409
+ module.exports = {
1410
+ DEFAULT: {
1411
+ css: [
1412
+ {
1413
+ color: 'var(--tw-prose-body)',
1414
+ maxWidth: '65ch',
1415
+ p: {}, // Required to maintain correct order when merging
1416
+ '[class~="lead"]': {
1417
+ color: 'var(--tw-prose-lead)',
1418
+ },
1419
+ a: {
1420
+ color: 'var(--tw-prose-links)',
1421
+ textDecoration: 'underline',
1422
+ fontWeight: '500',
1423
+ },
1424
+ strong: {
1425
+ color: 'var(--tw-prose-bold)',
1426
+ fontWeight: '600',
1427
+ },
1428
+ 'a strong': {
1429
+ color: 'inherit',
1430
+ },
1431
+ 'blockquote strong': {
1432
+ color: 'inherit',
1433
+ },
1434
+ 'thead th strong': {
1435
+ color: 'inherit',
1436
+ },
1437
+ ol: {
1438
+ listStyleType: 'decimal',
1439
+ },
1440
+ 'ol[type="A"]': {
1441
+ listStyleType: 'upper-alpha',
1442
+ },
1443
+ 'ol[type="a"]': {
1444
+ listStyleType: 'lower-alpha',
1445
+ },
1446
+ 'ol[type="A" s]': {
1447
+ listStyleType: 'upper-alpha',
1448
+ },
1449
+ 'ol[type="a" s]': {
1450
+ listStyleType: 'lower-alpha',
1451
+ },
1452
+ 'ol[type="I"]': {
1453
+ listStyleType: 'upper-roman',
1454
+ },
1455
+ 'ol[type="i"]': {
1456
+ listStyleType: 'lower-roman',
1457
+ },
1458
+ 'ol[type="I" s]': {
1459
+ listStyleType: 'upper-roman',
1460
+ },
1461
+ 'ol[type="i" s]': {
1462
+ listStyleType: 'lower-roman',
1463
+ },
1464
+ 'ol[type="1"]': {
1465
+ listStyleType: 'decimal',
1466
+ },
1467
+ ul: {
1468
+ listStyleType: 'disc',
1469
+ },
1470
+ 'ol > li::marker': {
1471
+ fontWeight: '400',
1472
+ color: 'var(--tw-prose-counters)',
1473
+ },
1474
+ 'ul > li::marker': {
1475
+ color: 'var(--tw-prose-bullets)',
1476
+ },
1477
+ dt: {
1478
+ color: 'var(--tw-prose-headings)',
1479
+ fontWeight: '600',
1480
+ },
1481
+ hr: {
1482
+ borderColor: 'var(--tw-prose-hr)',
1483
+ borderTopWidth: '1px',
1484
+ },
1485
+ blockquote: {
1486
+ fontWeight: '500',
1487
+ fontStyle: 'italic',
1488
+ color: 'var(--tw-prose-quotes)',
1489
+ borderInlineStartWidth: '0.25rem',
1490
+ borderInlineStartColor: 'var(--tw-prose-quote-borders)',
1491
+ quotes: '"\\201C""\\201D""\\2018""\\2019"',
1492
+ },
1493
+ 'blockquote p:first-of-type::before': {
1494
+ content: 'open-quote',
1495
+ },
1496
+ 'blockquote p:last-of-type::after': {
1497
+ content: 'close-quote',
1498
+ },
1499
+ h1: {
1500
+ color: 'var(--tw-prose-headings)',
1501
+ fontWeight: '800',
1502
+ },
1503
+ 'h1 strong': {
1504
+ fontWeight: '900',
1505
+ color: 'inherit',
1506
+ },
1507
+ h2: {
1508
+ color: 'var(--tw-prose-headings)',
1509
+ fontWeight: '700',
1510
+ },
1511
+ 'h2 strong': {
1512
+ fontWeight: '800',
1513
+ color: 'inherit',
1514
+ },
1515
+ h3: {
1516
+ color: 'var(--tw-prose-headings)',
1517
+ fontWeight: '600',
1518
+ },
1519
+ 'h3 strong': {
1520
+ fontWeight: '700',
1521
+ color: 'inherit',
1522
+ },
1523
+ h4: {
1524
+ color: 'var(--tw-prose-headings)',
1525
+ fontWeight: '600',
1526
+ },
1527
+ 'h4 strong': {
1528
+ fontWeight: '700',
1529
+ color: 'inherit',
1530
+ },
1531
+ img: {}, // Required to maintain correct order when merging
1532
+ picture: {
1533
+ display: 'block',
1534
+ },
1535
+ video: {}, // Required to maintain correct order when merging
1536
+ kbd: {
1537
+ fontWeight: '500',
1538
+ fontFamily: 'inherit',
1539
+ color: 'var(--tw-prose-kbd)',
1540
+ boxShadow: '0 0 0 1px var(--tw-prose-kbd-shadows), 0 3px 0 var(--tw-prose-kbd-shadows)',
1541
+ },
1542
+ code: {
1543
+ color: 'var(--tw-prose-code)',
1544
+ fontWeight: '600',
1545
+ },
1546
+ 'code::before': {
1547
+ content: '"`"',
1548
+ },
1549
+ 'code::after': {
1550
+ content: '"`"',
1551
+ },
1552
+ 'a code': {
1553
+ color: 'inherit',
1554
+ },
1555
+ 'h1 code': {
1556
+ color: 'inherit',
1557
+ },
1558
+ 'h2 code': {
1559
+ color: 'inherit',
1560
+ },
1561
+ 'h3 code': {
1562
+ color: 'inherit',
1563
+ },
1564
+ 'h4 code': {
1565
+ color: 'inherit',
1566
+ },
1567
+ 'blockquote code': {
1568
+ color: 'inherit',
1569
+ },
1570
+ 'thead th code': {
1571
+ color: 'inherit',
1572
+ },
1573
+ pre: {
1574
+ color: 'var(--tw-prose-pre-code)',
1575
+ backgroundColor: 'var(--tw-prose-pre-bg)',
1576
+ overflowX: 'auto',
1577
+ fontWeight: '400',
1578
+ },
1579
+ 'pre code': {
1580
+ backgroundColor: 'transparent',
1581
+ borderWidth: '0',
1582
+ borderRadius: '0',
1583
+ padding: '0',
1584
+ fontWeight: 'inherit',
1585
+ color: 'inherit',
1586
+ fontSize: 'inherit',
1587
+ fontFamily: 'inherit',
1588
+ lineHeight: 'inherit',
1589
+ },
1590
+ 'pre code::before': {
1591
+ content: 'none',
1592
+ },
1593
+ 'pre code::after': {
1594
+ content: 'none',
1595
+ },
1596
+ table: {
1597
+ width: '100%',
1598
+ tableLayout: 'auto',
1599
+ marginTop: em(32, 16),
1600
+ marginBottom: em(32, 16),
1601
+ },
1602
+ thead: {
1603
+ borderBottomWidth: '1px',
1604
+ borderBottomColor: 'var(--tw-prose-th-borders)',
1605
+ },
1606
+ 'thead th': {
1607
+ color: 'var(--tw-prose-headings)',
1608
+ fontWeight: '600',
1609
+ verticalAlign: 'bottom',
1610
+ },
1611
+ 'tbody tr': {
1612
+ borderBottomWidth: '1px',
1613
+ borderBottomColor: 'var(--tw-prose-td-borders)',
1614
+ },
1615
+ 'tbody tr:last-child': {
1616
+ borderBottomWidth: '0',
1617
+ },
1618
+ 'tbody td': {
1619
+ verticalAlign: 'baseline',
1620
+ },
1621
+ tfoot: {
1622
+ borderTopWidth: '1px',
1623
+ borderTopColor: 'var(--tw-prose-th-borders)',
1624
+ },
1625
+ 'tfoot td': {
1626
+ verticalAlign: 'top',
1627
+ },
1628
+ 'th, td': {
1629
+ textAlign: 'start',
1630
+ },
1631
+ 'figure > *': {}, // Required to maintain correct order when merging
1632
+ figcaption: {
1633
+ color: 'var(--tw-prose-captions)',
1634
+ },
1635
+ },
1636
+ defaultModifiers.gray.css,
1637
+ ...defaultModifiers.base.css,
1638
+ ],
1639
+ },
1640
+ ...defaultModifiers,
1641
+ }