Merge pull request #2465 from ehuss/footnote-line-height

Set line-height of superscripts to 0
This commit is contained in:
Eric Huss 2024-11-02 23:19:27 +00:00 committed by GitHub
commit 86ff2e1e6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;