-
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
MdInput renders suffix's width relative to input width; often too wide #1421
Comments
@jelbourn ,@mark-langer would you know of any workaround Style for fixing this? |
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jan 5, 2017
Prevents the input's suffix and prefix from stretching together with their parent node and leaving some weird spacing between themselves and the input. This was a side-effect of using `display: table-cell`. Fixes angular#2493. Fixes angular#1881. Fixes angular#1421.
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug, feature request, or proposal:
Bug
What is the expected behavior?
A suffix that is added to an
<md-input>
element should only be as wide as the suffix's contents.What is the current behavior?
The suffix's width is calculated relatively to the width of the entire input. If the input is, let's say, 650px wide, then the suffix renders to approximately 80px, although the suffix's content only has a width of, say, 24px.
What are the steps to reproduce?
Simply set the width of the
<md-input>
to a large number to see the relative sizing of the suffix.Plunker: http://plnkr.co/edit/DnK191LGat2o3bnOyTtt?p=preview
What is the use-case or motivation for changing an existing behavior?
The suffix is supposed to go to the very end of the input field. The current behaviour leaves too much white space to the right of the suffix.
Which versions of Angular, Material, OS, browsers are affected?
Tested with Angular 2.0.0, Material 2.0.0-alpha.9 on Firefox 49.0.1, Windows 10
Is there anything else we should know?
A good solution might be styling the div.md-input-table and its children as a flexbox in the MdInputComponent template.
The text was updated successfully, but these errors were encountered: