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
If you want to override the slider's color one at a time, i.e. to apply custom styles to each slider:
you will need to add classes to your sliders :
Then in your CSS, you can customize each of them as such:
:host ::ng-deep .average .mat-slider-thumb {
background-color: #ff3967;
}
:host ::ng-deep .min .mat-slider-thumb {
background-color: blue;
}
:host ::ng-deep .min .mat-slider-thumb-label {
background-color: blue;
}
:host ::ng-deep .min .mat-slider-track-fill {
background-color: blue;
}
:host ::ng-deep .max .mat-slider-thumb {
background-color: orange;
}
:host ::ng-deep .max .mat-slider-thumb-label {
background-color: orange;
}
:host ::ng-deep .max .mat-slider-track-fill {
background-color: orange;
}
All info about :host
and ::ng-deep
on the offical Angular documentation for component styles