Skip to content

Commit ee884f3

Browse files
authored
Fix space between <figcaption> and <pre> (#313)
* Fix space between `<figcaption>` and `<pre>` * Update changelog
1 parent 2ca7f49 commit ee884f3

File tree

2 files changed

+74
-74
lines changed

2 files changed

+74
-74
lines changed

Diff for: CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
### Fixed
11+
12+
- Fix space between `<figcaption>` and `<pre>` ([#313](https://github.com/tailwindlabs/tailwindcss-typography/pull/313))
1113

1214
## [0.5.9] - 2023-01-10
1315

Diff for: src/styles.js

+71-73
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,6 @@ let defaultModifiers = {
6060
marginTop: em(24, 14),
6161
marginBottom: em(24, 14),
6262
},
63-
figure: {
64-
marginTop: em(24, 14),
65-
marginBottom: em(24, 14),
66-
},
67-
'figure > *': {
68-
marginTop: '0',
69-
marginBottom: '0',
70-
},
71-
figcaption: {
72-
fontSize: em(12, 14),
73-
lineHeight: round(16 / 12),
74-
marginTop: em(8, 12),
75-
},
7663
code: {
7764
fontSize: em(12, 14),
7865
},
@@ -176,6 +163,19 @@ let defaultModifiers = {
176163
'tbody td:last-child, tfoot td:last-child': {
177164
paddingRight: '0',
178165
},
166+
figure: {
167+
marginTop: em(24, 14),
168+
marginBottom: em(24, 14),
169+
},
170+
'figure > *': {
171+
marginTop: '0',
172+
marginBottom: '0',
173+
},
174+
figcaption: {
175+
fontSize: em(12, 14),
176+
lineHeight: round(16 / 12),
177+
marginTop: em(8, 12),
178+
},
179179
},
180180
{
181181
'> :first-child': {
@@ -238,19 +238,6 @@ let defaultModifiers = {
238238
marginTop: em(32, 16),
239239
marginBottom: em(32, 16),
240240
},
241-
figure: {
242-
marginTop: em(32, 16),
243-
marginBottom: em(32, 16),
244-
},
245-
'figure > *': {
246-
marginTop: '0',
247-
marginBottom: '0',
248-
},
249-
figcaption: {
250-
fontSize: em(14, 16),
251-
lineHeight: round(20 / 14),
252-
marginTop: em(12, 14),
253-
},
254241
code: {
255242
fontSize: em(14, 16),
256243
},
@@ -354,6 +341,19 @@ let defaultModifiers = {
354341
'tbody td:last-child, tfoot td:last-child': {
355342
paddingRight: '0',
356343
},
344+
figure: {
345+
marginTop: em(32, 16),
346+
marginBottom: em(32, 16),
347+
},
348+
'figure > *': {
349+
marginTop: '0',
350+
marginBottom: '0',
351+
},
352+
figcaption: {
353+
fontSize: em(14, 16),
354+
lineHeight: round(20 / 14),
355+
marginTop: em(12, 14),
356+
},
357357
},
358358
{
359359
'> :first-child': {
@@ -416,19 +416,6 @@ let defaultModifiers = {
416416
marginTop: em(32, 18),
417417
marginBottom: em(32, 18),
418418
},
419-
figure: {
420-
marginTop: em(32, 18),
421-
marginBottom: em(32, 18),
422-
},
423-
'figure > *': {
424-
marginTop: '0',
425-
marginBottom: '0',
426-
},
427-
figcaption: {
428-
fontSize: em(16, 18),
429-
lineHeight: round(24 / 16),
430-
marginTop: em(16, 16),
431-
},
432419
code: {
433420
fontSize: em(16, 18),
434421
},
@@ -532,6 +519,19 @@ let defaultModifiers = {
532519
'tbody td:last-child, tfoot td:last-child': {
533520
paddingRight: '0',
534521
},
522+
figure: {
523+
marginTop: em(32, 18),
524+
marginBottom: em(32, 18),
525+
},
526+
'figure > *': {
527+
marginTop: '0',
528+
marginBottom: '0',
529+
},
530+
figcaption: {
531+
fontSize: em(16, 18),
532+
lineHeight: round(24 / 16),
533+
marginTop: em(16, 16),
534+
},
535535
},
536536
{
537537
'> :first-child': {
@@ -594,19 +594,6 @@ let defaultModifiers = {
594594
marginTop: em(40, 20),
595595
marginBottom: em(40, 20),
596596
},
597-
figure: {
598-
marginTop: em(40, 20),
599-
marginBottom: em(40, 20),
600-
},
601-
'figure > *': {
602-
marginTop: '0',
603-
marginBottom: '0',
604-
},
605-
figcaption: {
606-
fontSize: em(18, 20),
607-
lineHeight: round(28 / 18),
608-
marginTop: em(18, 18),
609-
},
610597
code: {
611598
fontSize: em(18, 20),
612599
},
@@ -710,6 +697,19 @@ let defaultModifiers = {
710697
'tbody td:last-child, tfoot td:last-child': {
711698
paddingRight: '0',
712699
},
700+
figure: {
701+
marginTop: em(40, 20),
702+
marginBottom: em(40, 20),
703+
},
704+
'figure > *': {
705+
marginTop: '0',
706+
marginBottom: '0',
707+
},
708+
figcaption: {
709+
fontSize: em(18, 20),
710+
lineHeight: round(28 / 18),
711+
marginTop: em(18, 18),
712+
},
713713
},
714714
{
715715
'> :first-child': {
@@ -772,19 +772,6 @@ let defaultModifiers = {
772772
marginTop: em(48, 24),
773773
marginBottom: em(48, 24),
774774
},
775-
figure: {
776-
marginTop: em(48, 24),
777-
marginBottom: em(48, 24),
778-
},
779-
'figure > *': {
780-
marginTop: '0',
781-
marginBottom: '0',
782-
},
783-
figcaption: {
784-
fontSize: em(20, 24),
785-
lineHeight: round(32 / 20),
786-
marginTop: em(20, 20),
787-
},
788775
code: {
789776
fontSize: em(20, 24),
790777
},
@@ -888,6 +875,19 @@ let defaultModifiers = {
888875
'tbody td:last-child, tfoot td:last-child': {
889876
paddingRight: '0',
890877
},
878+
figure: {
879+
marginTop: em(48, 24),
880+
marginBottom: em(48, 24),
881+
},
882+
'figure > *': {
883+
marginTop: '0',
884+
marginBottom: '0',
885+
},
886+
figcaption: {
887+
fontSize: em(20, 24),
888+
lineHeight: round(32 / 20),
889+
marginTop: em(20, 20),
890+
},
891891
},
892892
{
893893
'> :first-child': {
@@ -1237,8 +1237,7 @@ module.exports = {
12371237
{
12381238
color: 'var(--tw-prose-body)',
12391239
maxWidth: '65ch',
1240-
// TODO: Figure out how to not need this, it's a merging issue
1241-
p: {},
1240+
p: {}, // Required to maintain correct order when merging
12421241
'[class~="lead"]': {
12431242
color: 'var(--tw-prose-lead)',
12441243
},
@@ -1350,12 +1349,7 @@ module.exports = {
13501349
fontWeight: '700',
13511350
color: 'inherit',
13521351
},
1353-
// TODO: Figure out how to not need these, it's a merging issue
1354-
img: {},
1355-
'figure > *': {},
1356-
figcaption: {
1357-
color: 'var(--tw-prose-captions)',
1358-
},
1352+
img: {}, // Required to maintain correct order when merging
13591353
code: {
13601354
color: 'var(--tw-prose-code)',
13611355
fontWeight: '600',
@@ -1443,6 +1437,10 @@ module.exports = {
14431437
'tfoot td': {
14441438
verticalAlign: 'top',
14451439
},
1440+
'figure > *': {}, // Required to maintain correct order when merging
1441+
figcaption: {
1442+
color: 'var(--tw-prose-captions)',
1443+
},
14461444
},
14471445
defaultModifiers.gray.css,
14481446
...defaultModifiers.base.css,

0 commit comments

Comments
 (0)