Skip to content

Commit

Permalink
refactor: pass-through containers in BS5 only (#3960)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Dec 21, 2023
1 parent d29f4cd commit 122c1e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Breaking changes

* Both `conditionalPanel()` and `uiOutput()` are now styled with `display: contents` by default. This means that the elements they contain are positioned as if they were direct children of the parent container holding the `conditionalPanel()` or `uiOutput()`. This is probably what most users intend when they use these functions, but it may break apps that applied styles directly to the container elements created by these two functions. In that case, you may include CSS rules to set `display: block` for the `.shiny-panel-conditional` or `.shiny-html-output` classes. (#3957)
* Both `conditionalPanel()` and `uiOutput()` are now styled with `display: contents` by default in Shiny apps that use Bootstrap 5. This means that the elements they contain are positioned as if they were direct children of the parent container holding the `conditionalPanel()` or `uiOutput()`. This is probably what most users intend when they use these functions, but it may break apps that applied styles directly to the container elements created by these two functions. In that case, you may include CSS rules to set `display: block` for the `.shiny-panel-conditional` or `.shiny-html-output` classes. (#3957, #3960)

## New features and improvements

Expand Down
2 changes: 1 addition & 1 deletion inst/www/shared/shiny.min.css

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

6 changes: 6 additions & 0 deletions inst/www/shared/shiny_scss/shiny.bootstrap5.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ $notification-content-action-color: RGB(var(--#{$prefix}primary-rgb, #{to-rgb($p
$datepicker-disabled-color: $dropdown-link-disabled-color !default;

$shiny-file-active-shadow: $input-focus-box-shadow !default;

/* Treat conditional panels and uiOutput as "pass-through" containers */
.shiny-panel-conditional,
div:where(.shiny-html-output) {
display: contents;
}
6 changes: 0 additions & 6 deletions inst/www/shared/shiny_scss/shiny.scss
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,3 @@ html.autoreload-enabled #shiny-disconnected-overlay.reloading {
/* override anything bootstrap sets for `.nav` */
display: none !important;
}

/* Conditional panels and uiOutput */
.shiny-panel-conditional,
div:where(.shiny-html-output) {
display: contents;
}

0 comments on commit 122c1e7

Please sign in to comment.