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

Too much space between figcaption and code block (pre) #304

Closed
ramrami opened this issue May 16, 2023 · 2 comments · Fixed by #313
Closed

Too much space between figcaption and code block (pre) #304

ramrami opened this issue May 16, 2023 · 2 comments · Fixed by #313
Assignees

Comments

@ramrami
Copy link

ramrami commented May 16, 2023

What version of @tailwindcss/typography are you using?

v0.5.9

What version of Node.js are you using?

v16.13.1

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction repository

https://play.tailwindcss.com/iEhifXieK7

Describe your issue

When wrapping a code block (pre) inside a figure and adding a figcaption, too much margin is added between the code block and the caption. I expected the space to be the same as the one used for an image+caption.

It looks like there is some specificity issue between these two rules:

.prose :where(pre):not(:where([class~="not-prose"] *)) {
    margin-top: 1.7142857em;
    margin-bottom: 1.7142857em;
}

and

.prose :where(figure > *):not(:where([class~="not-prose"] *)) {
    margin-top: 0;
    margin-bottom: 0;
}

Thanks.

@reinink
Copy link
Member

reinink commented Aug 30, 2023

Hey! Thanks so much for bringing this to our attention. I've just fixed this in #313, and this will be included in an upcoming release of this plugin 👍

@ramrami
Copy link
Author

ramrami commented Aug 30, 2023

Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants