-
Notifications
You must be signed in to change notification settings - Fork 32
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
add modded CSS from basic theme for footnotes/citations #313
Conversation
2f747c4
to
e5887a0
Compare
One thing I noticed is that the first line of the footnote text, if it is wrapped, gets indented more because it is pushed over by the float. This problem is addressed by the use of a table or ol element. We could also fix it in CSS though by using CSS grid without changing the html. Alternatively just increasing the padding would probably fix it in most cases. |
I noticed that too. I actually decreased the padding (paragraph's margin-left) because wrapped lines looked oddly estranged. As for the floated element pushing the first line of a paragraph, I'll look into the CSS grid idea. The problem is that the footnote label/back-link(s) are not guaranteed to always be the same width (as evident by the citation example). |
0d2791f
to
1be0c60
Compare
I found and fixed a flaw with my CSS grid attempt. Citations and footnotes now use a 3 col grid. The 2nd col is used for multiple backrefs. If there is only 1 backref, then it is incorporated into the |
1be0c60
to
9592bb6
Compare
Thanks. I'm not sure exactly what the desired formatting is. However if we want to achieve table-like formatting, where the text content is all aligned even if the label portions have different widths, then we need all of the footnotes to be contained within a single grid. One way to achieve that is to apply Now that css subgrid (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Subgrid) is supported by all major browsers, this could also be done in a cleaner way using CSS subgrid without having to rely on the |
contents are not guaranteed to be paragraphs; use agnostic selectors
9592bb6
to
09d131c
Compare
ping @jbms TL;DR: using nested CSS grids would require monkeypatching Sphinx's output of footnotes/citations. The body of the footnote/citation needs to be contained in a separate HTML element, but instead Sphinx outputs the body within the same container element that also holds the elements describing the back-ref. I'd rather not resort to monkeypatching just to satisfy a desired CSS design. |
resolves #312
I also noticed that the
npm run check
wasn't getting executed in CI; I think there were some changes in GH Actions' expressions aboutcontains()
.