Change default background color of md-slider of Angular Material

后端 未结 7 641
野的像风
野的像风 2021-02-04 20:06

I am using md-slider of Angular Material version 2.0.0-beta.8

I have selected the indigo-pink theme and imported it in

7条回答
  •  心在旅途
    2021-02-04 21:00

    Using color="primary" is just to set it to one of it's default themes. Only way to change the background-color as of now is,

    /deep/.mat-accent .mat-slider-thumb, 
    /deep/.mat-accent .mat-slider-thumb-label,
    /deep/.mat-accent .mat-slider-track-fill {
        background-color: #128CB0;
    }
    

    Does anyone here know how to change the color of the text in the thumb-label though? Adding color: #fffff within the same css does not seem to help, it's still using black as the color.

提交回复
热议问题