Angular - Material: Progressbar custom color?

后端 未结 9 2459
生来不讨喜
生来不讨喜 2020-12-14 09:09

I am now trying for hours. I use Material2 and simply want to change the color of the progress-bar. I know there are those themes (primary/accent/warn) but I want to have a

9条回答
  •  我在风中等你
    2020-12-14 10:11

    Update:

    Avoid using deep, TL;DR: Deep is technically invalid (like, deeprecated :p)

    For more info refer: The use of /deep/ and >>> in Angular 2

    Now, to change the color of mat-progress bar, Here is how I got it working,

    Head over to your styles.scss file (or the main css/scss file in your project)

    Add this class -->

    .green-progress .mat-progress-bar-fill::after {
        background-color: green !important;
    }
    

    Your mat-progress should use the above class, like -->

    
    

提交回复
热议问题