-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Make sidebar width more flexible #218
Conversation
Could we do a percentage width of say 25% (so 256px at the lower bound before the sidebar disappears)? |
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 |
A width defined in % or vw units, yes. |
We might need some more breakpoints for that - |
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: |
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. |
@@ -140,6 +140,8 @@ span.pre { | |||
} | |||
|
|||
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 hardcoded width: 217px;
from div.sphinxsidebarwrapper
(There's a conflict after merging #219.) |
Will fix it in a bit |
Thanks! |
Thanks for the reviews/comments! |
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/