Angular 8: Change Height in Mat-form-field to Specific pixel number

一笑奈何 提交于 2020-02-02 13:07:06

问题


How can I change height in mat-form-field with appearance="outline" to a specific height pixel number, 40px (or any required number from UX team in the future). I need to reduce the mat-form-field.

How can this be done? What is the equation, or which part number can be modified to change to 40px? -1.1? .75 , 133%, Looking for some kind of function or math equation using answer below, or any other option which may work.

https://stackoverflow.com/a/54762506/12425844

::ng-deep .mat-form-field-flex > .mat-form-field-infix { padding: 0.4em 0px !important;}
::ng-deep .mat-form-field-label-wrapper { top: -1.5em; }

::ng-deep .mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label {
    transform: translateY(-1.1em) scale(.75);
    width: 133.33333%;
}

来源:https://stackoverflow.com/questions/59977079/angular-8-change-height-in-mat-form-field-to-specific-pixel-number

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!