How do I customize Angular Material's input/md-input-container component?

后端 未结 4 541
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-05 11:06

As stated in the title, how do I customize these elements? It seems they are using transparent background which is very difficult to view on most background palettes

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-05 11:46

    Add one blank css file after "angular-material.css" and inside that blank css file overwrite the rules you want to customize.

    For the problem you are facing I added the following rules in my custom.css.

    md-input-container.md-default-theme label, 
     md-input-container.md-default-theme .md-placeholder{
        color:grey !important;
    }
    

    Here you could change color or background-color as you like.

提交回复
热议问题