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 }}
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
mdAutocomplete: floating label input padding too large #5764
The padding on md-autocomplete does not match other input sizes. See an example here: http://codepen.io/mckenzielong/pen/RWvxQv The text and select boxes have equal spacing, and the md-autocomplete is just slightly larger.
This was introduced after a fix to correct the placement of the progress bar: 44d1636
Haven't looked at the scss, but only the generated css file... probably isn't this straight forward: remove the 26px padding-bottom and adjust the bottom to be 16px instead of 40px.
+1 combined autocomplete height is 94px vs 70px for a regular md-input-container(with text input).
Looks like this line needs to remove the + $input-error-height. My guess is this means special handling for ng-messages is required though. I suspect somehow the padding/margin need to merge a bit so that we can keep that 24px in the padding for ng-messages.
I'm trying to understand the current behavior of the autocomplete directive.
&[md-floating-label] {
border-radius: 0;
background: transparent;
height: auto;
md-input-container {
padding-bottom: $input-container-padding + $input-error-height;
// When we have ng-messages, remove the input error height from our bottom padding, since the
// ng-messages wrapper has a min-height of 1 error (so we don't adjust height as often; see
// input.scss file)
&.md-input-has-messages {
padding-bottom: $input-container-padding;
}
}
But as we can see there is ngMessage already handled. So why is there the error height added. Does a normal autocomplete without ngMessage support error messages?
+1. Have noticed some inconsistencies in the heights of the autocomplete, select and inputs which means we have had to fiddle with CSS to get the padding correct.
Probably worth mentioning here that not only is the label positioning off, but also the input text.
black = Material Design spec
red = current ngMaterial implementation (1.0.0-RC6)
While aesthetically insignificant on an individual component, when the elements of multiple components' in a form are not aligned, it makes the page look unpolished.
Activity
epelc commentedon Nov 16, 2015
+1 combined autocomplete height is 94px vs 70px for a regular md-input-container(with text input).
Looks like this line needs to remove the
+ $input-error-height. My guess is this means special handling forng-messagesis required though. I suspect somehow the padding/margin need to merge a bit so that we can keep that 24px in the padding forng-messages.material/src/components/autocomplete/autocomplete.scss
Line 54 in 1a2035b
A simple fix for now(if you aren't using ng-messages) is to add the following to your scss.
devversion commentedon Nov 18, 2015
Yes @epelc.
I'm trying to understand the current behavior of the
autocompletedirective.But as we can see there is
ngMessagealready handled. So why is there the error height added. Does a normalautocompletewithoutngMessagesupport error messages?pmchugh3 commentedon Nov 18, 2015
+1. Have noticed some inconsistencies in the heights of the autocomplete, select and inputs which means we have had to fiddle with CSS to get the padding correct.
devversion commentedon Nov 18, 2015
Yeah the problem is definitely the floating label at the autocomplete.
(
&[md-floating-label] md-input-container)I'm currently hanging on the
$input-error-height. It was placed by sense, so we can't remove it without thinkingmattdanna commentedon Dec 7, 2015
Probably worth mentioning here that not only is the label positioning off, but also the input text.
black = Material Design spec

red = current ngMaterial implementation (1.0.0-RC6)
While aesthetically insignificant on an individual component, when the elements of multiple components' in a form are not aligned, it makes the page look unpolished.