Skip to content

Commit

Permalink
Fix space between <figcaption> and <pre> (#313)
Browse files Browse the repository at this point in the history
* Fix space between `<figcaption>` and `<pre>`

* Update changelog
  • Loading branch information
reinink committed Aug 30, 2023
1 parent 2ca7f49 commit ee884f3
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 74 deletions.
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

1 comment on commit ee884f3

@vercel
Copy link

@vercel vercel bot commented on ee884f3 Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.