Skip to content

Commit

Permalink
fix(shiny-preset): Don't get in the way of navbar sass vars
Browse files Browse the repository at this point in the history
For page_navbar(), don't set CSS vars holding the default background colors if the user gave us $navbar-bg and $navbar-{light,dark}-bg sass vars.

For page_sidebar(), don't set navbar colors if the user is relying on $navbar-bg
  • Loading branch information
gadenbuie committed Nov 19, 2024
1 parent 85b0428 commit ce0d2f0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions inst/builtin/bs5/shiny/_rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,12 @@ $bslib-checkbox-radio-margin-right: 0.35em !default;

.bslib-page-navbar, .bslib-page-dashboard {
> .navbar {
--bslib-navbar-default-bg: var(--#{$prefix}body-bg);
--bslib-navbar-inverse-bg: var(--#{$prefix}body-color);
@if not $navbar-light-bg and not $navbar-bg {
--bslib-navbar-default-bg: var(--#{$prefix}body-bg);
}
@if not $navbar-dark-bg and not $navbar-bg {
--bslib-navbar-inverse-bg: var(--#{$prefix}body-color);
}
}

> .navbar + div {
Expand All @@ -196,8 +200,10 @@ $bslib-checkbox-radio-margin-right: 0.35em !default;
}

.bslib-page-sidebar {
--bslib-page-sidebar-title-bg: var(--#{$prefix}body-bg);
--bslib-page-sidebar-title-color: var(--#{$prefix}body-color);
@if not $navbar-bg {
--bslib-page-sidebar-title-bg: var(--#{$prefix}body-bg);
--bslib-page-sidebar-title-color: var(--#{$prefix}body-color);
}

.bslib-page-title {
border-color: var(--#{$prefix}border-color-translucent);
Expand Down

0 comments on commit ce0d2f0

Please sign in to comment.