-
Notifications
You must be signed in to change notification settings - Fork 26
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 flex padding/margin overflow in Card component #554
Labels
🐛 Type: Bug
Something isn't working
Comments
I'm wondering though if it's a general problem or only in the dialog/modal case 🤔 I'll look into it a bit more... |
Wait, I think I got confused. The container I was looking at is the I'll find a workaround for now then. |
Actually I think we should fix it in the |
emmenko
added a commit
that referenced
this issue
Feb 19, 2019
emmenko
added a commit
that referenced
this issue
Feb 19, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The
SpacingCard element (which aredisplay: flex
) should not have anypadding
. Instead there should be an inner container that implements the spacingpadding
ormargin
.To Reproduce
I noticed that when implementing the
{Info,Confirmation}Dialog
(commercetools/merchant-center-application-kit#367, commercetools/merchant-center-application-kit#367).According to this SO answer (https://stackoverflow.com/a/37785605) this is because of how the calculation of the flex container is done in regards to padding/margin.
Setting the padding/margin to
0
will obviously remove the "overflow".Expected behavior
The
SpacingCard component should not cause overflow on the parent container element.I would suggest to have a wrapping
<div>
inside the Card container, where the<div>
will set the padding/marginI can spin up a PR to better illustrate the fix.
The text was updated successfully, but these errors were encountered: