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

Fill containers/items can spill out into their parent's margin #400

Closed
cpsievert opened this issue Sep 5, 2023 · 0 comments · Fixed by #401
Closed

Fill containers/items can spill out into their parent's margin #400

cpsievert opened this issue Sep 5, 2023 · 0 comments · Fixed by #401

Comments

@cpsievert
Copy link
Collaborator

Currently both bindFillRole(x, item = TRUE) and/or bindFillRole(x, container = TRUE) adds width:100% to x, which means that, if the parent of x has a margin set, x will be larger than it's parent, which is problematic. Fortunately, I don't think we need the width:100% .

For a minimal reprex, notice how the inner-most div spills out into the parent margin.

library(htmltools)
library(bslib)

page_fillable(
  div(
    as_fill_carrier(),
    class = "m-3",
    div(
      as_fill_item(),
      class = "border border-2"
    ),
  )
)
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 a pull request may close this issue.

1 participant