-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
DOC: Improve internal sphinx13 style #12439
Conversation
While a systematic update of the theme would be desirable, that's quite a large topic, and will likely not happen any time soon. This PR adds a few changes to the theme to make it more readable and visually more appealing. In particular: - Slightly increase the font weight of headings (300 --> 400). These have been quite thin and tended to blend into the surrounding text. The increased weight makes sections a little more distinct. - Adapt the color of the search box border to sphinx-blue. Up to now, it had inherited the green from the basic style, which does not fit. - Add horizontal bars between the components of the side bar. This makes the separation between local ("On this page") and global ("Site navigation") more clear. - Re-style admonitions to use colored title backgrounds. The colors make the kind of admonition more clear. Up to now, all admonitions looked similar.
This looks great thanks!
Completely agree the theme needs updating 👍 Do you have any time/desire to work on more improvements, or ideas you would like to share? I feel like essentially it would be great to work towards having a "built-in" https://pradyunsg.me/furo and/or even https://pradyunsg.me/lutra |
I believe, #10419 covers most aspects well:
In all, this makes is quite difficult to move forward. I think the pragmatic approach is:
I believe half of the task is proper documentation and communication (current state, best practices, etc.). |
Indeed. Just to know, do you have in mind / intend to create PRs for any more improvements?
yeh exactly, I don't know if anyone really uses them anymore 🤷 |
W.r.t. sphinx13 style, I have aggregated the most obvious improvements into this PR. I have no concrete further plans. There are some other improvments that users would benefit from, in alabaster (default theme), sphinx doc content, and the result of |
- Remove "Site navigation" header - this is already contextually clear (especially since separators were added in #12439) - Hide "On this page" if `display_toc is False` - Format "On this page" header similar to top-level site-nav sections
The colours, and also most icons, are emulated from the recent sphinx13.css update (PR sphinx-doc#12486, PR sphinx-doc#12439).
- The colours, and also most icons, are emulated from the recent sphinx13.css update (PR sphinx-doc#12486, PR sphinx-doc#12439). - Add iconpackage key to sphinxsetup key of latex_elements fontawesome5 is used if available, else fall-back to fontawesome. If none is available, drop icons and shift titles left. In all cases, div.<type>_title-icon keys allow user to set arbitrary code to be used. - Defaults for padding and border-widths of admonitions have been changed, now that they all acquire a default background colour. The defaults always have horizontal padding plus border-width add up to 12.5pt, so contents of all types align exactly vertically. Or course user can specify arbitrary values. - The code inserting the coloured title-row incorporates a work-around to a feature of TeX vertical lists when they start with for example a colour special. It would not be necessary with LaTeX of 2023-06-01 and newer. cf Improve spacing at top of minipages in https://www.latex-project.org/news/latex2e-news/ltnews37.pdf
While a systematic update of the theme would be desirable, that's quite a large topic, and will likely not happen any time soon.
This PR adds a few changes to the theme to make it more readable and visually more appealing. In particular:
Slightly increase the font weight of headings (300 --> 400). These have been quite thin and tended to blend into the surrounding text. The increased weight makes sections a little more distinct.
Note: The need of this seems to depends on the font used. But generally, 300 is quite thin (normal weight would be 500) and thus IMHO not too well suited for a heading.
Adapt the color of the search box border to sphinx-blue. Up to now, it had inherited the green from the basic style, which does not fit.
old:
new:
Add horizontal bars between the components of the side bar. This makes the separation between local ("On this page") and global ("Site navigation") more clear.
Re-style admonitions to use colored title backgrounds. The colors make the kind of admonition more clear. Up to now, all admonitions looked similar.
old:
new: