diff --git a/src/theme/css/general.css b/src/theme/css/general.css index 7670b087..0862b516 100644 --- a/src/theme/css/general.css +++ b/src/theme/css/general.css @@ -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;