-
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
sidebar()
in page_navbar()
adds gaps/padding
#761
Comments
I'm also having this problem. This is an example on shinylive If # This works (when no sidebar)
<div class="container-fluid html-fill-item html-fill-container">
<div class="tab-content html-fill-item html-fill-container" data-tabsetid="7391">
<div class="tab-pane active html-fill-item html-fill-container bslib-gap-spacing" data-value="Page1" id="tab-7391-1" style="--bslib-navbar-margin:0;padding:3px;" role="tabpanel">
<div class="card bslib-card bslib-mb-spacing html-fill-item html-fill-container" data-require-bs-caller="card()" data-require-bs-version="5">
# This adds space around the tab-pane that is not controlled by padding argument in page_navbar()
<div class="html-fill-item html-fill-container">
<div class="bslib-sidebar-layout bslib-mb-spacing html-fill-item" data-bslib-sidebar-border="false" data-bslib-sidebar-border-radius="false" data-bslib-sidebar-open="desktop" data-require-bs-caller="layout_sidebar()" data-require-bs-version="5" style="--_sidebar-width: 250px; --_mobile-max-height: 250px; --_js-toggle-count-this-side: 0; --_js-toggle-count-max-side: 1;">
<div class="main bslib-gap-spacing html-fill-container">
<div class="tab-content html-fill-item html-fill-container" data-tabsetid="8075">
<div class="tab-pane active html-fill-item html-fill-container bslib-gap-spacing" data-value="Page1" id="tab-8075-1" style="--bslib-navbar-margin:0;padding:3px;" role="tabpanel">
<div class="card bslib-card bslib-mb-spacing html-fill-item html-fill-container" data-require-bs-caller="card()" data-require-bs-version="5">
Adding the padding style to this line makes it look correct in browser developer tools: <div class="main bslib-gap-spacing html-fill-container" style=" padding: 3px; "> Another related issue, it seems that using |
Thanks @davos-i, I just submitted a PR to fix the difference between We'll have to think about the best way to handle ui <- page_navbar(
padding = '48px',
nav_panel("Page1",card("text"))
) When a global sidebar is included, we insert a ui <- page_navbar(
padding = '48px',
sidebar = sidebar('sidebar text'),
nav_panel("Page1",card("text"))
) You're right that there's an extra element adding its own padding, which is the |
Describe the problem
Adding a
sidebar()
topage_navbar()
seems to add back (? or ignore?) the gap removals. In comparison, this seems to work (or work as I expect it) withlayout_sidebar()
.make_page()
make_page(sidebar(open = FALSE))
compared to ...
Session Info
The text was updated successfully, but these errors were encountered: