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

Footnote line height adds too much space. #2437

Open
ehuss opened this issue Sep 11, 2024 · 2 comments
Open

Footnote line height adds too much space. #2437

ehuss opened this issue Sep 11, 2024 · 2 comments
Labels
A-footnotes Area: footnotes A-Style Area: Style (CSS, etc.) C-bug Category: A bug, incorrect or unintended behavior

Comments

@ehuss
Copy link
Contributor

ehuss commented Sep 11, 2024

Problem

When there is a footnote on a multi-line paragraph, the line with the footnote ends up adding some extra vertical space to the line:

image

I don't think it looks very good, and would like to see some kind of solution to avoid that.

Steps

Have a multi-line paragraph with a footnote after the first line.

Possible Solution(s)

No response

Notes

No response

Version

mdbook v0.4.40
@ehuss ehuss added A-Style Area: Style (CSS, etc.) C-bug Category: A bug, incorrect or unintended behavior A-footnotes Area: footnotes labels Sep 11, 2024
@loliceo
Copy link

loliceo commented Oct 2, 2024

Hi! I was wondering if it was okay if I made a pull request for this issue?

I did read the contributions guideline and it said that I was free to claim the issue but this is my first time contributing so I was a bit nervous.

Possible Issue

I think this issue was because the all the text in the paragraph already has a line-height of 1.5 and the footnote-reference gets another line-height of 1.5 leading to this issue.

Solution

The only change I made was adding this piece of css

.footnote-reference{
    line-height: 0;
}

Before

Before

After

After

@ehuss
Copy link
Contributor Author

ehuss commented Oct 2, 2024

If it works on all the major browsers (chrome, safari, firefox, mobile safari, mobile chrome), and doesn't overlap with descenders of the previous line, then sounds great to me to get this fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-footnotes Area: footnotes A-Style Area: Style (CSS, etc.) C-bug Category: A bug, incorrect or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants