You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Input components (md-input, md-select, md-checkbox etc) aren't aligned in a flex container... #2124
md-input behaves differently to md-select (and at least md-checkbox, possibly all the other "input" components) when the elements are within a "flex container"
This issue might be resolved with the in-progress refactor of input?
Reacted by Michael Prentice, Niedermann IT-Dienstleistungen, Bernd Hirschmann, Daniel Sokolowski, Nicolas Labrot, elvirdolic, biqiang, erik-sjoestedt, wanli, goldenbearkin and 26 more
Thanks for reporting! The various form components should definitely align. We'll need to figure out which baseline to standardize under. cc: @jelbourn.
I recognized that also the spacing between the selected/input text and the label is different for md-select and md-input. The screenshot below shows a md-input and a md-select with the spacing im referring to. I would really appreciate, if they would use the same spacing to improve homogeneity of the forms. Since I think, this aspect is related to the topic of this issue, I didn't open a new one.
On https://material.io/guidelines/components/text-fields.html#text-fields-labels there are two definitions for that kind of spacing under Labels -> Specs. Actually, it seems to be that md-select implements the left one with 8dp space between label and text and md-input implements the right one with 4dp spacing.
Reacted by Rene Vallecillo V, Jacek Czuchnowski, Carlos Venegas , Adrien Crivelli, Stas Tolpekin, derek and Vitaliy
This is a bit off topic, but why not using md-input-container for md-select ?
It would be great to have a single entry point.
Maybe this is stupid question and not possible at all due to constraints, but to me this looks more logic.
This could also be used to group radio button or checkbox in order to define a placeholder which looks exactly like md-input placeholder.
Thanks
Reacted by André Roggeri Campos, Naveed Ahmed, Marcin Kopacz and Leonardo
Thank you for all this wonderful code. I am busy refactoring a ton of Bootstrap.
On this mention of a common wrapper, I have been wishing for md-prefix and md-hint support across all of the form controls. For inputs I have enjoyed using md-prefix with md-icon together -- for example a search icon.
This might be related: besides the header not having the same height from the text ... the initial overall height is not the same.
The standard input looks like it has the height of 50px and the select box is 30px.
so after you fill in something there is no space between the top like the standard input
Activity
dreweird commentedon Dec 9, 2016
it's been 6 hours ago....
I have to update my npm
kara commentedon Dec 9, 2016
Thanks for reporting! The various form components should definitely align. We'll need to figure out which baseline to standardize under. cc: @jelbourn.
DSoko2 commentedon Jan 6, 2017
I recognized that also the spacing between the selected/input text and the label is different for md-select and md-input. The screenshot below shows a md-input and a md-select with the spacing im referring to. I would really appreciate, if they would use the same spacing to improve homogeneity of the forms. Since I think, this aspect is related to the topic of this issue, I didn't open a new one.
On https://material.io/guidelines/components/text-fields.html#text-fields-labels there are two definitions for that kind of spacing under Labels -> Specs. Actually, it seems to be that md-select implements the left one with 8dp space between label and text and md-input implements the right one with 4dp spacing.
no-more commentedon Feb 2, 2017
Hi,
This is a bit off topic, but why not using md-input-container for md-select ?
It would be great to have a single entry point.
Maybe this is stupid question and not possible at all due to constraints, but to me this looks more logic.
This could also be used to group radio button or checkbox in order to define a placeholder which looks exactly like md-input placeholder.
Thanks
sumpton commentedon Feb 2, 2017
Thank you for all this wonderful code. I am busy refactoring a ton of Bootstrap.
On this mention of a common wrapper, I have been wishing for md-prefix and md-hint support across all of the form controls. For inputs I have enjoyed using md-prefix with md-icon together -- for example a search icon.
tmburnell commentedon Feb 7, 2017
This might be related: besides the header not having the same height from the text ... the initial overall height is not the same.

The standard input looks like it has the height of 50px and the select box is 30px.
so after you fill in something there is no space between the top like the standard input
tmburnell commentedon Feb 23, 2017
Here is another example:

This uses material beta 2, and flex-layout beta 5
EladBezalel commentedon Mar 5, 2017
@jmcgoldrick do you mind update your plunker to make it work so i can investigate it further?
jmcgoldrick commentedon Mar 6, 2017
@EladBezalel see here: http://plnkr.co/edit/TgFy04UErh9Xhr0A4XzK?p=preview I've updated with some toggles for the common issues I have come across:
Oh, and some bits to highlight some of the elements if it helps
55 remaining items
dimabutenko commentedon Oct 17, 2017
What about mat-checkbox? I can't to add this to mat-form-field. Thanks
Fixed alignment with select inputs since angular/components#2124 is n…
Fixed alignment with select inputs since angular/components#2124 is n…
melroy89 commentedon Mar 24, 2018
@dimabutenko Same issue. Strange that mat-checkbox can't be part of a mat-form-field right..
vanmxpx commentedon Apr 3, 2018
::ng-deep .mat-form-field-prefix, ::ng-deep .mat-form-field-suffix { align-self: flex-end; }this fix issue for prefix and suffix
kakins commentedon May 16, 2018
I'm still seeing this issue, even with input and select wrapped in mat-form-field. I'm not sure if this is really resolved?
...
benelliott commentedon May 16, 2018
@kakins How are the items aligned in the parent container? Can you post a StackBlitz repro?
JessyParis commentedon Oct 11, 2018
Same issue than Kakins with Material 6.4.7

JessyParis commentedon Oct 11, 2018
But it is working well in flex container.

GreedyA1 commentedon Sep 4, 2019
any update on this one?
Splaktar commentedon Sep 6, 2019
@GreedyA1 no, it was closed almost 2 years ago. If you are seeing a bug with the latest release, please open a new issue.
angular-automatic-lock-bot commentedon Oct 7, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.