Angular Material mat-spinner custom color

后端 未结 15 1643
慢半拍i
慢半拍i 2021-01-07 16:11

Does anyone know how can I change mat-spinner color in Angular Material? Overriding css doesn\'t work. I tried changing color in material files but they can only be imported

15条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-07 17:12

    In case you guys want to customize each spinner on your webpage. You can do it this way:

    svg .mat-progress-spinner circle, .mat-spinner circle {
      stroke: inherit;
    }
    

    And now on mat-spinner add class:

    
    

    And in css file:

    .custom-spinner-color {
      stroke: #234188;
    }
    

    That was what I wanted to achieve. I suppose if you look for this question you probably want the same.

提交回复
热议问题