Skip to content

Commit 86ff2e1

Browse files
authored
Merge pull request #2465 from ehuss/footnote-line-height
Set line-height of superscripts to 0
2 parents f4cf32e + 6ef7cc0 commit 86ff2e1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/theme/css/general.css

+10
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,16 @@ kbd {
190190
vertical-align: middle;
191191
}
192192

193+
sup {
194+
/* Set the line-height for superscript and footnote references so that there
195+
isn't an awkward space appearing above lines that contain the footnote.
196+
197+
See https://github.com/rust-lang/mdBook/pull/2443#discussion_r1813773583
198+
for an explanation.
199+
*/
200+
line-height: 0;
201+
}
202+
193203
:not(.footnote-definition) + .footnote-definition,
194204
.footnote-definition + :not(.footnote-definition) {
195205
margin-block-start: 2em;

0 commit comments

Comments
 (0)