Closed gadenbuie closed 1 week ago
The Shiny preset sets --bslib-sidebar-bg
--bslib-sidebar-bg
https://github.com/rstudio/bslib/blob/85b042832e1520b5f06dc95c769396816be76eca/inst/builtin/bs5/shiny/_rules.scss#L138
but this masks $bslib-sidebar-bg if set
$bslib-sidebar-bg
https://github.com/rstudio/bslib/blob/85b042832e1520b5f06dc95c769396816be76eca/inst/components/scss/sidebar.scss#L2
because .bslib-sidebar-layout will always consult the CSS variable before falling back to the default color
.bslib-sidebar-layout
https://github.com/rstudio/bslib/blob/85b042832e1520b5f06dc95c769396816be76eca/inst/components/scss/sidebar.scss#L17
Generally speaking the Shiny preset _rules.scss comes before sidebar.scss (or even in a separate Sass compilation), but I think we can safely assume that if $bslib-sidebar-bg exists we should use that value instead of our default.
_rules.scss
sidebar.scss
The Shiny preset sets
--bslib-sidebar-bg
https://github.com/rstudio/bslib/blob/85b042832e1520b5f06dc95c769396816be76eca/inst/builtin/bs5/shiny/_rules.scss#L138
but this masks
$bslib-sidebar-bg
if sethttps://github.com/rstudio/bslib/blob/85b042832e1520b5f06dc95c769396816be76eca/inst/components/scss/sidebar.scss#L2
because
.bslib-sidebar-layout
will always consult the CSS variable before falling back to the default colorhttps://github.com/rstudio/bslib/blob/85b042832e1520b5f06dc95c769396816be76eca/inst/components/scss/sidebar.scss#L17
Generally speaking the Shiny preset
_rules.scss
comes beforesidebar.scss
(or even in a separate Sass compilation), but I think we can safely assume that if$bslib-sidebar-bg
exists we should use that value instead of our default.