Skip to content

Commit

Permalink
fix(shiny-preset): Fix page dashboard class for page_sidebar/navbar (#…
Browse files Browse the repository at this point in the history
…917)

Co-authored-by: gadenbuie <[email protected]>
  • Loading branch information
gadenbuie and gadenbuie authored Nov 22, 2023
1 parent 21821c1 commit 6bfcef8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# bslib (development version)

* Fixed the CSS for the `bslib-page-dashboard` class in the Shiny preset to correctly support `page_sidebar(class = "bslib-page-dashboard")` and `page_navbar(nav_panel(class = "bslib-page-dashboard"))`. (#917)

# bslib 0.6.0

## Breaking changes
Expand Down
8 changes: 6 additions & 2 deletions inst/builtin/bs5/shiny/_rules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,13 @@ $bslib-checkbox-radio-margin-right: 0.35em !default;
}
}

// Set the background color of the page or main content area
.bslib-page-dashboard {
// Set the background color of page dashboard class...
.bslib-page-dashboard,
// or of global main content area in a page_navbar() with a global sidebar
.main:has(.tab-content > .bslib-page-dashboard.active) {
background-color: var(--bslib-dashboard-main-bg);
// or of main area of a page_sidebar()
--_main-bg: var(--bslib-dashboard-main-bg);
}

.bslib-page-navbar, .bslib-page-dashboard {
Expand Down
2 changes: 1 addition & 1 deletion inst/components/dist/components.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/components/dist/components.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/components/dist/web-components.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6bfcef8

Please sign in to comment.