Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't add bslib-gap-spacing when card body is not fillable #1073

Merged
merged 4 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

* The main content area of `page_sidebar()` and `page_navbar()` with a `sidebar` now have a minimum height and width to avoid squashed content in fillable layouts. The minimum height and width are controllable via Sass and CSS variables (see the pull requests for details). (#1057, #1059)

* When `card_body(fillable = FALSE)`, bslib now preserves flow-layout margin bottom settings. (#1073)

# bslib 0.7.0

This large release includes many improvements and bug fixes for newer UI components like `layout_columns()`, `card()`, and `sidebar()`. In addition, the new `input_task_button()` offers a drop-in replacement for `shiny::actionButton()` (to prevent multiple submissions of the same operation) as well as pairing nicely with the new `shiny::ExtendedTask` for implementing truly non-blocking operations in Shiny.
Expand Down
3 changes: 2 additions & 1 deletion R/card.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ card_body <- function(..., fillable = TRUE, min_height = NULL, max_height = NULL
}

tag <- div(
class = "card-body bslib-gap-spacing",
class = "card-body",
class = if (fillable) "bslib-gap-spacing",
style = css(
min_height = validateCssUnit(min_height),
"--bslib-card-body-max-height" = validateCssUnit(max_height),
Expand Down
3 changes: 2 additions & 1 deletion R/layout.R
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ row_heights_css_vars <- function(x) {
grid_item_container <- function(el, ..., fillable = TRUE) {
div(
...,
class = "bslib-grid-item bslib-gap-spacing",
class = "bslib-grid-item",
class = if (fillable) "bslib-gap-spacing",
if (fillable) as_fillable_container(),
el
)
Expand Down
Loading