Input components (md-input, md-select, md-checkbox etc) aren't aligned in a flex container...
See original GitHub issue… without setting align-items: center
Updated Plunk: http://plnkr.co/edit/TgFy04UErh9Xhr0A4XzK?p=preview
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”
See this plunk for an example: http://plnkr.co/edit/aLXsp8MlV2AoOkC9aEFP?p=preview
This issue might be resolved with the in-progress refactor of input?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:36
- Comments:59 (13 by maintainers)
Top Results From Across the Web
Aligning items in a flex container - CSS: Cascading Style Sheets
align -content: space-evenly (not defined in the Flexbox specification). In the live example below, the flex container has a height of 400 pixels ......
Read more >md-input-container and label not aligned - Stack Overflow
I am trying to create a filter for price, and I am stuck on aligning these elements correctly. With this code: <div formGroupName="price....
Read more >Flex Cheatsheet
A flex container establishes a new flex formatting context for its contents. This is the same as establishing a block formatting context, except...
Read more >A Complete Guide to Flexbox | CSS-Tricks
This complete guide explains everything about flexbox, focusing on all the different possible properties for the parent element (the flex ...
Read more >Understanding Flexbox: Everything you need to know
Learning Flexbox may not be fun at first. It will challenge what you know ... Flex items : The children elements within a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just wanted to give a quick explanation about this and what the hold-up is. The input and select components have been maintained by two different people and over time as fixes were made to one of them in order to make it closer to the spec it didn’t necessarily translate into a fix in the other. At this point there are a lot of things missing from the select that have been added to the input (spacing that matches the material spec, error message support, ability to hire the required marker). In order to make these two components more consistent we want to refactor the select to share a lot more code with the input, but its a fairly large undertaking.
In the mean time I do recommend just adding some
margin
orpadding
to the select to make it line up with the input in your app as many here have suggested. After the refactor you should be able to remove the custom margin and have them line up to begin with.show stopper for me at the moment