Skip to content
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-hint> and <mat-error> text gets cut off at the bottom #15524

Open
ienzam opened this issue Mar 19, 2019 · 5 comments
Open

<mat-hint> and <mat-error> text gets cut off at the bottom #15524

ienzam opened this issue Mar 19, 2019 · 5 comments
Labels
area: material/form-field P4 A relatively minor issue that is not relevant to core functions

Comments

@ienzam
Copy link
Contributor

ienzam commented Mar 19, 2019

What is the expected behavior?

We should be able to see the whole hint and error text.

What is the current behavior?

Hint and error text get cut off at the bottom.

What are the steps to reproduce?

https://angular-material-issue-hint-error-cut.stackblitz.io

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

All of them I think.

Is there anything else we should know?

For outline,

@ienzam ienzam changed the title <mat-hint> and <mat-error> text gets cut off <mat-hint> and <mat-error> text gets cut off at the bottom Mar 19, 2019
@Rlcolli4
Copy link

Rlcolli4 commented May 31, 2019

We are having a similar problem in our application with text being verticaly cut off with our errors and hints.
We want to use the MatError in the MatFormField but, due to some design decisions out of my control, we have to shrink the form field to a specific size and as a result the errors and hints get cut off.
The reason we chose to shorten the MatFormField was due to multiple attempts to resize the width of the MatInput. Each attempt resulted in either the styling being ignored, or items like material select or material suffix behaving in unexpected ways (IE the suffix being cut off, the drop down error not showing up, etc).

@josephperrott josephperrott added the P4 A relatively minor issue that is not relevant to core functions label Jun 4, 2019
@ayeletdn
Copy link

I have just come across this issue. Our design constraints are using a base font size of 14px and the font Barlow. We are incorporating the font using the recommended mat-core($custom-typography). I noticed that by changing either the font size (even by one pixel) or the font family (back to the original Roboto) reduces the problem, but that's not a realistic solution as it is a system-wide font.

I'm not sure why the original stackblitz doesn't seem to show the problem but I have recreated it on the latest angular 11.2 environment:
https://stackblitz.com/edit/angular-hint-charcters-truncated?file=src/styles.scss

Attaching screenshot for quick reference:

image

@Zackysh
Copy link

Zackysh commented Sep 2, 2021

Same problem here:

image

I gave it a simple solution, just add a bit of margin.bottom, it results on:

image

@ricardoandradee
Copy link

I am facing the same issue, the message is cut off. Has anyone been able to solve this issue yet?

@jeroennijhuis
Copy link

So i was also running against the problem where my mat-hint would be cut off after two lines. But overwriting the MAT_FORM_FIELD_DEFAULT_OPTIONS seems to be my fix.
Adding the provider and setting the subscriptSizing to dynamic will no longer cut off any text.

{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { subscriptSizing: 'dynamic' } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/form-field P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

8 participants