-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(form-field): multiple projected block-level prefix/suffix stacking on top of each other #14317
Conversation
…g on top of each other Fixes multiple block elements that are projected inside a prefix or a suffix stacking on top of each other, rather than going sideways.
@@ -45,6 +45,9 @@ $mat-form-field-default-infix-width: 180px !default; | |||
white-space: nowrap; | |||
flex: none; | |||
position: relative; | |||
|
|||
// Allow for projected block-level elements not stand next to each other, rather than stack. | |||
display: flex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mmalerba as far as I could tell there shouldn't be any visual differences, but you might have some more insights.
We also need to fix alignments with :
With this, |
@TFleury applying those styles seems to cause misalignment of the prefix and suffix in the legacy form field. I'm fine with this change, but I never really intended for people to use multiple prefix/suffix. If people want to do something like that they can make a single prefix/suffix which is a wrapper div and aligns its children however they want |
It looks like this does actually cause some slight alignment changes in people's apps. I think I'd rather not make this change and instead encourage people to only use a single matPrefix / matSuffix (even if that single element is a wrapper containing several sub-elements). |
Makes sense. Closing since it seems like a high risk change for a rare case that shouldn't really be supported. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes multiple block elements that are projected inside a prefix or a suffix stacking on top of each other, rather than going sideways.