rstudio / bslib

Tools for theming Shiny and R Markdown via Bootstrap 3, 4, or 5.
https://rstudio.github.io/bslib/
Other
443 stars 49 forks source link

Consider giving `page_sidebar()` and `page_navbar()` main areas `min-width` #1040

Closed gadenbuie closed 1 month ago

gadenbuie commented 2 months ago

A rule like this is helpful to ensure that opening the sidebar doesn't overly squish the main content

@media (min-width: 576px) {
  .bslib-page-sidebar > .bslib-sidebar-layout.html-fill-item > .main {
    min-width: max(576px, 100%);
  }
}

This rule isn't quite perfect because the scrolling happens across the entire content area and not the main sidebar area, but it's a reasonable starting place.

Collapsed

image

Expanded, with rule

image

Expanded, without rule

image