-
-
Notifications
You must be signed in to change notification settings - Fork 13
Fix footnote styling #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It's for positioning the footnote link when clicking the footnote backlink (correction for sticky navbar). Without it — the footnote link is hidden beneath the (sticky) navbar: With it — it's visible: I'll re-add it |
But you added the exact same rule as this PR removed? 🤨 Did you test the rule with actual footnote content? The problem I referred to is content like the following paragraph: Some paragraph with a footnote reference[^1] in the middle.
[^1]: A footnote. This paragraph is split (line wrap) after "referen 8000 ce" in the rendered HTML. |
Plus: the problem your CSS rule is intended to solve applies to all anchor links (fragment identifiers), not just footnotes, right? So I guess the |
Only |
Will look into a fix |
This is way more elegant (just a oneliner) and robust : sup[id] {
scroll-margin-top: 5rem;
} Resources: One line CSS solution to prevent anchor links from scrolling behind a sticky or fixed header |
Awesome, thank you! I didn't know about |
Me neither 😄 |
Summary
Fixes styling of footnotes. The affected CSS rule caused the
<sup>
element from footnote references to be unclickable and have a line break before it.Note that I have no clue what purpose the affected CSS rule was originally intended to serve.
Motivation
Fix footnotes in content.
Checks
npm run test