Set line-height of superscripts to 0

This changes it so that superscript (and in particular footnote tags)
do not bump the line spacing of previous lines.
This commit is contained in:
Eric Huss 2024-11-02 16:09:14 -07:00
parent 5ec4f65ac3
commit 6ef7cc0ccb

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;