Breaking changes
-
The navbar-related style options of
page_navbar()
andnavset_bar()
have been consolidated into a singlenavbar_options
argument that pairs with a newnavbar_options()
helper. Using the directposition
,bg
,inverse
,collapsible
, andunderline
arguments will continue to work with a deprecation message. (#1141)Related to the above change,
navset_bar()
now defaults to usingunderline = TRUE
so that bothpage_navbar()
andnavset_bar()
use the same set of defaultnavbar_options()
.In
navbar_options()
,inverse
is replaced bytheme
, which takes values"light"
(dark text on a light background),"dark"
(light text on a dark background), or"auto"
(follow page settings, the default). This change affects that default navbar foreground and background colors for Bootswatch preset themes with Bootstrap 5. Detailed instructions for customizing the navbar appearance, especially for Bootswatch themes, can be found in?navbar_options
. (#1146)
New features
- bslib now supports unified theming with brand.yml. brand.yml lets you theme your Shiny apps, Quarto documents and more with a single, portable YAML file. Learn more in the new Unified theming with brand.yml article. (#1148)
Improvements and bug fixes
-
navset_card_pills()
,navset_card_underline()
,navset_card_tabs()
fixed to now respect header/footer arguments (@tanho63, #1024) -
Fixed a bug in
bs_themer()
(andbs_theme_preview()
) that caused it to stop applying changes if a Sass variable wasNULL
. (@meztez, #1112) -
Optimized for better performance the internal functions that compile Sass to call the
color-contrast()
algorithm. (#1140) -
input_switch()
andinput_dark_mode()
can be included in Shiny's bookmarking feature. (#1166) -
Fixed an issue with the Shiny preset (
bs_theme(5, "shiny")
) that caused a floating underling to appear when anav_panel_hidden()
was used and active. (#1170) -
bslib now uses navbar markup with Bootstrap 5 that's closer to the expected markup for Bootstrap. We still include the
navbar-default
ornavbar-inverse
classes on the<nav>
element, for backwards compatibility, but in apps that use Bootstrap 5 these classes have no styles. (#1146) -
The following functions are no longer marked "experimental":
accordion()
,breakpoints()
,card()
,input_dark_mode()
,input_switch()
,layout_columns()
,layout_column_wrap()
,page_fillable()
,page_sidebar()
,layout_sidebar()
,sidebar()
,popover()
,tooltip()
andvalue_box()
.