Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix space between <figcaption> and <pre> #313

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Fix space between `<figcaption>` and `<pre>` ([#313](https://github.com/tailwindlabs/tailwindcss-typography/pull/313))

## [0.5.9] - 2023-01-10

Expand Down
144 changes: 71 additions & 73 deletions src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,6 @@ let defaultModifiers = {
marginTop: em(24, 14),
marginBottom: em(24, 14),
},
figure: {
marginTop: em(24, 14),
marginBottom: em(24, 14),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(12, 14),
lineHeight: round(16 / 12),
marginTop: em(8, 12),
},
code: {
fontSize: em(12, 14),
},
Expand Down Expand Up @@ -176,6 +163,19 @@ let defaultModifiers = {
'tbody td:last-child, tfoot td:last-child': {
paddingRight: '0',
},
figure: {
marginTop: em(24, 14),
marginBottom: em(24, 14),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(12, 14),
lineHeight: round(16 / 12),
marginTop: em(8, 12),
},
},
{
'> :first-child': {
Expand Down Expand Up @@ -238,19 +238,6 @@ let defaultModifiers = {
marginTop: em(32, 16),
marginBottom: em(32, 16),
},
figure: {
marginTop: em(32, 16),
marginBottom: em(32, 16),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(14, 16),
lineHeight: round(20 / 14),
marginTop: em(12, 14),
},
code: {
fontSize: em(14, 16),
},
Expand Down Expand Up @@ -354,6 +341,19 @@ let defaultModifiers = {
'tbody td:last-child, tfoot td:last-child': {
paddingRight: '0',
},
figure: {
marginTop: em(32, 16),
marginBottom: em(32, 16),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(14, 16),
lineHeight: round(20 / 14),
marginTop: em(12, 14),
},
},
{
'> :first-child': {
Expand Down Expand Up @@ -416,19 +416,6 @@ let defaultModifiers = {
marginTop: em(32, 18),
marginBottom: em(32, 18),
},
figure: {
marginTop: em(32, 18),
marginBottom: em(32, 18),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(16, 18),
lineHeight: round(24 / 16),
marginTop: em(16, 16),
},
code: {
fontSize: em(16, 18),
},
Expand Down Expand Up @@ -532,6 +519,19 @@ let defaultModifiers = {
'tbody td:last-child, tfoot td:last-child': {
paddingRight: '0',
},
figure: {
marginTop: em(32, 18),
marginBottom: em(32, 18),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(16, 18),
lineHeight: round(24 / 16),
marginTop: em(16, 16),
},
},
{
'> :first-child': {
Expand Down Expand Up @@ -594,19 +594,6 @@ let defaultModifiers = {
marginTop: em(40, 20),
marginBottom: em(40, 20),
},
figure: {
marginTop: em(40, 20),
marginBottom: em(40, 20),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(18, 20),
lineHeight: round(28 / 18),
marginTop: em(18, 18),
},
code: {
fontSize: em(18, 20),
},
Expand Down Expand Up @@ -710,6 +697,19 @@ let defaultModifiers = {
'tbody td:last-child, tfoot td:last-child': {
paddingRight: '0',
},
figure: {
marginTop: em(40, 20),
marginBottom: em(40, 20),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(18, 20),
lineHeight: round(28 / 18),
marginTop: em(18, 18),
},
},
{
'> :first-child': {
Expand Down Expand Up @@ -772,19 +772,6 @@ let defaultModifiers = {
marginTop: em(48, 24),
marginBottom: em(48, 24),
},
figure: {
marginTop: em(48, 24),
marginBottom: em(48, 24),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(20, 24),
lineHeight: round(32 / 20),
marginTop: em(20, 20),
},
code: {
fontSize: em(20, 24),
},
Expand Down Expand Up @@ -888,6 +875,19 @@ let defaultModifiers = {
'tbody td:last-child, tfoot td:last-child': {
paddingRight: '0',
},
figure: {
marginTop: em(48, 24),
marginBottom: em(48, 24),
},
'figure > *': {
marginTop: '0',
marginBottom: '0',
},
figcaption: {
fontSize: em(20, 24),
lineHeight: round(32 / 20),
marginTop: em(20, 20),
},
},
{
'> :first-child': {
Expand Down Expand Up @@ -1237,8 +1237,7 @@ module.exports = {
{
color: 'var(--tw-prose-body)',
maxWidth: '65ch',
// TODO: Figure out how to not need this, it's a merging issue
p: {},
p: {}, // Required to maintain correct order when merging
'[class~="lead"]': {
color: 'var(--tw-prose-lead)',
},
Expand Down Expand Up @@ -1350,12 +1349,7 @@ module.exports = {
fontWeight: '700',
color: 'inherit',
},
// TODO: Figure out how to not need these, it's a merging issue
img: {},
'figure > *': {},
figcaption: {
color: 'var(--tw-prose-captions)',
},
img: {}, // Required to maintain correct order when merging
code: {
color: 'var(--tw-prose-code)',
fontWeight: '600',
Expand Down Expand Up @@ -1443,6 +1437,10 @@ module.exports = {
'tfoot td': {
verticalAlign: 'top',
},
'figure > *': {}, // Required to maintain correct order when merging
figcaption: {
color: 'var(--tw-prose-captions)',
},
},
defaultModifiers.gray.css,
...defaultModifiers.base.css,
Expand Down
Loading