components icon indicating copy to clipboard operation
components copied to clipboard

md-input text is partially cut with different body font sizes

Open Dunos opened this issue 8 years ago • 9 comments

What is the current behavior?

When the body size of the document/html is something different that 16px, the input text gets cut for some letter like "p", "g", "q".

What are the steps to reproduce?

Working demo of the issue in this stackblitz demo

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

Angular Material 5.0.3 (it happens since beta version) Angular 5.1.2 Sierra OS Chrome 63 / Firefox 57

Dunos avatar Jan 03 '18 11:01 Dunos

I can't see the cuts (windows 10, Chrome):

image

julianobrasil avatar Jan 03 '18 12:01 julianobrasil

@julianobrasil Forgot to say that I'm using MAC, with Chrome (v63) but it is also happening in Firefox (v57).

captura de pantalla 2018-01-03 a las 14 21 14

Dunos avatar Jan 03 '18 13:01 Dunos

same problem and I fixed by myself

.input {                  
  div.mat-form-field-infix {
    padding: .3em 0;
    input.mat-input-element {
      height: 17px;
      vertical-align: top;
    }
  }
}
div.mat-form-field-wrapper{
  padding-bottom: 1.15em;
}

add class input in your <mat-form-field></mat-form-field> tag. to make sure mat-select avoid this problem, use:

.select {
  div.mat-input-infix {
    padding: .3em 0;
  }
  div.mat-select-value{
    height: 17px;
    vertical-align: top;
  }
}

also add class select in your <mat-form-field></mat-form-field> tag. PS: test in <mat-form-field></mat-form-field> tag font-size:14px;

Howard-Song avatar Jan 05 '18 01:01 Howard-Song

Yeah I also solve this thing with custom CSS for now, but I think we should not be doing this

Dunos avatar Jan 05 '18 09:01 Dunos

Closing as a dupe of #9738

mmalerba avatar Feb 23 '18 23:02 mmalerba

I honestlly belive that this is not a duplication of the said ticket. That refers to the mat-hint, and this ticket is about the md-input text.

Also, this still happens on my setup still: image Angular 7.0.1, Material 7.0.2, Chrome: Version 69.0.3497.100 (Official Build) Ubuntu 16.04LTS (64-bit)

KissBalazs avatar Jan 10 '19 15:01 KissBalazs

Did you fix this? By commenting out the line-height in .mat-form-field seemed to fix this for me.

ryannewelluk avatar Apr 25 '19 08:04 ryannewelluk

This is not a duplicate - the referenced issue is for a different part of the component.

dougrday avatar Jul 02 '19 17:07 dougrday

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.