-
Notifications
You must be signed in to change notification settings - Fork 297
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
ENH: White space behavior for main content #753
Conversation
Hm, it's possible that I've insufficiently rolled back my various customizations, but I removed my custom Not sure where that "show source" link is coming from, wasn't there before. I assume that's a conf option. In any case it occurs to me that now I really might want |
@mwaskom I think that if you use the Would it be helpful if we added a CSS helper class like .full-width {
max-width: 100%;
flex-grow: 1;
} that could be re-used? (and yep, I think |
Oh sorry I missed that was an extra customization step.
Sorry for being dense but add this where? |
In your own custom CSS file, I'd add a selector like: .bd-content {
max-width: 100%;
flex-grow: 1;
} then if you delete the sidebars the content should expand. |
Yay! Looking good now! |
Is there a page in the documentation that is behaving as described in this PR ? |
Yep, two examples:
|
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.
Let's make it happen ! it will be very useful!
Co-authored-by: Rambaud Pierrick <12rambau@users.noreply.github.com>
@mwaskom ah yeah this is on |
@choldgraf This seems promising, will definitely check it out when it's released |
Thanks @choldgraf! I’m delighted to learn how effective it can be to bully you on twitter 😝 |
This is an attempt at making the whitespace behavior more predictable for the general page layout. It does the following things:
<div>
elements with manually-defined Bootstrap columns if the primary/secondary sidebars are not defined. Instead they will simply not be there at all.justify-content: center
which means the sidebars and article content will bunch in the middle of the page:notoc:
to hide the secondary sidebar, and also renames this (previously undocumented) variable to betheme_html_remove_secondary_sidebar
. Ideally we'd want this to be more like a dict ({"theme_html": {"remove_secondary_sidebar": True}}
) but we can't do that with reStructuredText metadata unfortunately.Example
Here's an example of deleting the primary and secondary sidebars in succession.
In addition, if you wanted the page content to take up all available space, you could add a CSS rule like:
I think that this should result in more predictable behavior for folks like @mwaskom while still looking nice. What do folks think?
Example pages
closes #704 closes #760