MatFormField hint and error alignment wrong when using a matPrefix icon
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
#### Bug, feature request, or proposal:
Bug
#### What is the expected behavior?
Hint and error text are horizontally aligned with input text and both are indented if a matPrefix icon is present.
#### What is the current behavior?
The hint and error text are never indented when matPrefix is used.
#### What are the steps to reproduce?
https://stackblitz.com/edit/angular-h1lpum?embed=1&file=app/form-field-appearance-example.html
#### What is the use-case or motivation for changing an existing behavior?
Material Design guidelines are not being followed.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 6.0.5, Angular Material 6.2.1
#### Is there anything else we should know?
The alignment spec is not explicitly mentioned, but the anatomy diagram is clear: https://material.io/design/components/text-fields.html#anatomy.
Contributor guide
Research direction
Start with the linked StackBlitz reproduction and inspect the mat-form-field behavior when a matPrefix icon is present. Done means hint and error text align horizontally with the input text and are indented consistently with the prefix, while preserving the existing form-field behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100