-
-
Notifications
You must be signed in to change notification settings - Fork 78.5k
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
Long buttons in modal-footer don't start on a new line #24800
Comments
adding demo of what i mean: https://codepen.io/gijsbotje/pen/POJBRp |
Thanks @gijsbotje, I didn't know about |
Right now, this is the SCSS for the // Footer (for actions)
.modal-footer {
display: flex;
align-items: center; // vertically center
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
padding: $modal-inner-padding;
border-top: $modal-footer-border-width solid $modal-footer-border-color;
// Easily place margin between footer elements
> :not(:first-child) { margin-left: .25rem; }
> :not(:last-child) { margin-right: .25rem; }
} If this is changed to this, all cases are covered:
_modal.scss:
// Footer (for actions)
.modal-footer {
display: flex;
align-items: center; // vertically center
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
flex-wrap: wrap;
padding: $modal-inner-padding - $modal-footer-margin-between / 2;
border-top: $modal-footer-border-width solid $modal-footer-border-color;
// Place margin between footer elements
> * {
margin: $modal-footer-margin-between / 2;
}
} The problem is that a universal selector is used here because it is also possible that Demo of the solution: https://codepen.io/MartijnCuppens/pen/bYMKXm |
It looks like there is an issue with buttons when they are used in a
modal-footer
. If they are too long, they do not start on a new line like it would be expected. Instead, they appear to be out of their container:The reduced case is pretty straightforward, simply copying and pasting the code snippet from the docs reproduces it.
(For the sake of the example, the buttons have very long text, but the bug is also observable with reasonably short button text on small displays such as iPhone 5).
I could observe this behaviour with Safari (mobile & desktop) and Chrome (desktop), so I suppose it is not browser-specific.
The text was updated successfully, but these errors were encountered: