Skip to content

Conversation

@gadenbuie
Copy link
Member

@gadenbuie gadenbuie commented Jan 24, 2024

Fixes a small CSS issue that has an outsized impact on layout_column_wrap(). We have a rule for layout_columns() that makes all columns take up the entire row for md sizes and down, but only if the user didn't supply col_widths at or below the md breakpoint.

This rule was inadvertently being applied to layout_column_wrap() because they share the .bslib-grid class.

Example

library(shiny)
pkgload::load_all()
library(bslib)

ui <- page_fillable(
    h3("layout_column_wrap()"),
    layout_column_wrap(
        width = 200,
        card("Card 1"),
        card("Card 2"),
        card("Card 3")
    ),
    h3("layout_columns()"),
    layout_columns(
        card("Card 1"),
        card("Card 2"),
        card("Card 3")
    )
)

shinyApp(ui, \(...) { })

@gadenbuie gadenbuie requested a review from cpsievert January 24, 2024 17:30
@gadenbuie gadenbuie self-assigned this Jan 24, 2024
@gadenbuie gadenbuie merged commit e496d71 into main Jan 24, 2024
@gadenbuie gadenbuie deleted the fix/layout-column-wrap-md-collapse branch January 24, 2024 17:56
gadenbuie added a commit that referenced this pull request Jan 24, 2024
# Conflicts:
#	R/sysdata.rda
#	inst/components/dist/components.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants