Skip to content

Commit

Permalink
Merge pull request #2465 from ehuss/footnote-line-height
Browse files Browse the repository at this point in the history
Set line-height of superscripts to 0
  • Loading branch information
ehuss authored Nov 2, 2024
2 parents f4cf32e + 6ef7cc0 commit 86ff2e1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/theme/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ kbd {
vertical-align: middle;
}

sup {
/* Set the line-height for superscript and footnote references so that there
isn't an awkward space appearing above lines that contain the footnote.
See https://github.com/rust-lang/mdBook/pull/2443#discussion_r1813773583
for an explanation.
*/
line-height: 0;
}

:not(.footnote-definition) + .footnote-definition,
.footnote-definition + :not(.footnote-definition) {
margin-block-start: 2em;
Expand Down

0 comments on commit 86ff2e1

Please sign in to comment.