-
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
Mat-Select with appearance="standard": Arrow too high #11925
Comments
hi @mmalerba, it looks like the "standard" appearance is the only appearance type in which the arrow doesn't look correct, even though it is "correctly" centered. one way this could be fixed is to check if the placeholder input property or mat-label directive is being used. if either one is being used, the style should be here's the blame for reference: |
@johnbuffington yeah that seems reasonable, do you want to send a PR for it? |
Hmm, even with a label, as long as no value is selected it looks weird, because the label transitions into the value area. The other non-legacy appearances have a visible height because of the border/background, and their value area is moved way up as well. EDIT: For an easy comparison: https://stackblitz.com/edit/angular-o9gzca-6nuihz?file=app/select-no-ripple-example.html Would it be possible to shift the arrow up to the current position whenever the select has a selected value? |
@seritools That is not something I've seen in the spec, but the spec also seems to have completely removed this variant... so I'm ok with it if it doesn't look too jarring. If one of you wants to send a PR with this change I'll take a look and see how it feels. |
I think I misread the way issues are referenced in the commits :S |
This commit aims to fix the arrow positioning of mat-selects with appearance="standard". Since the label moves down whenever the selected value is empty, the arrow looks out of place. I added an animation that matches the speed of the label animation: Going from filled to empty transitions the arrow down so that it sits level with the label. Going from empty to filled snaps the arrow back up, matching the label's behavior. To test/compare the different appearances I added another card to the demo-app with all of them.
There are still no examples under To be honest I'm getting used to it, but at first the way it looks really is bizarre, compared to the other example styles. At the very least the documentation needs updating, to include examples for |
@simeyla I noticed this as well a few months ago, and even reported a bug for it (#13907). |
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. |
Bug, feature request, or proposal:
When using appearance="standard" on a mat-form-field, the arrow of a mat-select moves up quite a lot.
What is the expected behavior?
The arrow should be at the same location as with legacy appearance.
What is the current behavior?
A
translateY(-50%)
is applied to the arrow-wrapper, moving it too high.What are the steps to reproduce?
Stackblitz, based on an example from the Angular Material docs: https://stackblitz.com/edit/angular-o9gzca?file=app/select-no-ripple-example.html
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Tested with 6.2.1, updated to 6.3.0, still occurring. Angular 6.0.6, Typescript 2.7.2.
Tested in Chrome 69 dev, IE11, Vivaldi, etc.
The text was updated successfully, but these errors were encountered: