components icon indicating copy to clipboard operation
components copied to clipboard

mat-hint spacing looks wrong when appearance === "fill"

Open hblieb opened this issue 8 years ago • 3 comments

Bug, feature request, or proposal:

BUG

What is the expected behavior?

Should have comfortable vertical spacing between form field inputs.

What is the current behavior?

mat-hint is too close to the input below

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.

https://stackblitz.com/edit/angular-material2-issue-hmzwhb

What is the use-case or motivation for changing an existing behavior?

Common form layouts should look great.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Is there anything else we should know?

hblieb avatar Jul 03 '18 19:07 hblieb

@hblieb Hi, I think I found the problem. Check the demo below. https://stackblitz.com/edit/angular-material2-issue-mxpgdq It seem to be the mat-form-field-wrapper in appearance fill losing its margin. It fixed when I add this css into styles.css.

.mat-form-field-wrapper{
  margin: 4px 0;
}

Fill

image

Outline

image

Best wished.

tearforfear007 avatar Mar 13 '19 06:03 tearforfear007

We intentionally leave the margin up to the user to apply. If we were to specify a margin and someone wanted a smaller one they would have to override our styles, so its easier to have it take up the minimum space in the layout by default

mmalerba avatar May 27 '20 21:05 mmalerba

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.