-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: Set min height/width of main content area of page_sidebar()
#1057
Conversation
…ge contents with a sidebar
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 is a fantastic idea.
I'm slightly concerned about the Also, regardless, let's make sure to have good note about this (in both bslib and py-shiny) |
Oh shoot, thanks for catching this. I meant to limit this change to only apply above the sm break point. That avoids the issue you rightly pointed out with fillable mobile layouts. |
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.
Thanks, please also do a PR for py-shiny after merging.
Fixes #1040
Adds an additional wrapper element around the main sidebar content of
page_sidebar()
andpage_navbar()
with a sidebar. The wrapper gets a.bslib-page-sidebar-main
class that setsmin-width
andmin-height
, currently both to thesm
breakpoint width, i.e.576px
.The width and height can be customized in two ways:
Via Sass by settings
$bslib-page-sidebar-main-min-width
or$bslib-page-sidebar-main-min-height
. Both aremap_get($grid-breakpoints, sm) !default;
Via CSS variables
--bslib-page-sidebar-main-min-width
and--bslib-page-sidebar-main-min-height
.Demo
Demo app
Kapture.2024-05-24.at.13.55.44.mp4