简体   繁体   中英

Angular Material mat-form-field doesnt render css styles

Sometimes, not always, browser renders input fields without css styles, like border on this screenshot. No errors. Does someone know how to fix it?

在此处输入图片说明

I found out that applying a ::ng-deep to a component element through related css-file can cause a changing around all components inside app. So I wrapped current component in a single css class, and modified related css correspondingly.

 .my-component ::ng-deep .mat-form-field-underline { display: none; }
 <div class="my-component"> .. </div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM