Fix footnote styles to work with latest Sphinx + docutils #489
Replies: 2 comments 6 replies
-
Hi @pradyunsg, I see you converted the issue created for this into this discussion. Just wanted to explain that I created an issue rather than a discussion because we already had a prior discussion about this in #452, and I interpreted your much-appreciated response there and your followup reporting to the Sphinx and docutils projects as acknowledgment that you would welcome a trackable issue for this, now that there is an unblocked piece of work that would fix this in Furo, when used with recent enough Sphinx + docutils. I'm sorry I misunderstood, and I hope you don't mind. If there are any other thoughts you can share to clarify this issue, I'd be grateful to understand better. Thanks again for all your great work on Furo and in the community in general. |
Beta Was this translation helpful? Give feedback.
-
@pradyunsg, I followed https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html#adding-custom-css-or-javascript-to-sphinx-documentation to work around this in a custom.css file. If my workaround generalizes, then the following patch to Furo would fix this: diff --git a/src/furo/assets/styles/content/_footnotes.sass b/src/furo/assets/styles/content/_footnotes.sass
index 608f895d..4afdd721 100644
--- a/src/furo/assets/styles/content/_footnotes.sass
+++ b/src/furo/assets/styles/content/_footnotes.sass
@@ -40,4 +40,5 @@ div.citation > span
aside.footnote > p,
div.citation > p
- margin-left: 2rem
+ margin-left: 1rem
+ display: inline-block Would you be willing to give this two-line change a try with one of your projects that uses footnotes, and if all looks good to you, apply the changes? |
Beta Was this translation helpful? Give feedback.
-
What's happening?
A new version of Sphinx has now been released, which changes its dependency pins to allow docutils 0.19, which includes a fix for New HTML markup for footnotes is difficult to stylise, along with corresponding Sphinx changes.
Now that both Sphinx and docutils have made stable releases to address this issue, I believe Furo is no longer blocked from writing styles that fix the regression in footnote alignment that was caused by the changes in docutils 0.18. (The latest version of Furo is still causing the broken looking footnotes that are visible in this screenshot when used with latest Sphinx (5.1.1) and docutils (0.19).)
Reproducer
pip install -r requirements/docs.txt && make -C docs html
from a fresh clone.docs/_build/html/index.html
in a browser.Ref: #452
Expectation
Alignment of footnotes stays consistent and correct, as it appeared before the changes introduced in docutils 0.18 caused this breakage:
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions