Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork74
Make sidebar width more flexible#218
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
AA-Turner commentedFeb 2, 2025
Could we do a percentage width of say 25% (so 256px at the lower bound before the sidebar disappears)? |
tomasr8 commentedFeb 2, 2025
Just to clarify, you mean to have a fixed sidebar width of 256px or some kind of dynamic sizing? The latter would require additional style changes |
AA-Turner commentedFeb 2, 2025
A width defined in % or vw units, yes. |
tomasr8 commentedFeb 2, 2025
We might need some more breakpoints for that - |
hugovk commentedFeb 2, 2025
And maybe an upper bound where it's a fixed width, compare: https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/index.html As it stands, this is PR good for mobile, the sidebar is always shown: |
tomasr8 commentedFeb 3, 2025
I made the sidebar more like the pydata theme Hugo shared. The width is now calculated as
Fixed, some of the selectors I was using were too specific. |
| } | ||
| div.sphinxsidebar { | ||
| display: flex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is flexbox required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This allows me to remove the hardcodedwidth: 217px; fromdiv.sphinxsidebarwrapper
hugovk commentedFeb 3, 2025
(There's a conflict after merging#219.) |
tomasr8 commentedFeb 3, 2025
Will fix it in a bit |
b6a1724 intopython:mainUh oh!
There was an error while loading.Please reload this page.
hugovk commentedFeb 4, 2025
Thanks! |
tomasr8 commentedFeb 4, 2025
Thanks for the reviews/comments! |

Uh oh!
There was an error while loading.Please reload this page.
Related issue:#209
This is a less disruptive version of#214
This simply increases the width of the sidebar to 260px (not set in stone, happy to discuss the appropriate value)
Two more things I considered that we could discuss but didn't include in the PR
.bodywrapper). Though we could convert it to flexbox as well.Feedback welcome!
📚 Documentation preview 📚:https://python-docs-theme-previews--218.org.readthedocs.build/