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(layout_columns): Don't break grid-column on md-down #970

Merged
merged 4 commits into from
Jan 24, 2024

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 self-assigned this Jan 24, 2024
@gadenbuie gadenbuie merged commit e496d71 into main Jan 24, 2024
1 check passed
@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.

None yet

2 participants