Angular Material Change Theme Color of <mat-list-option> checkbox

Viewed 3493

Is it possible to change the color of the checkbox using the material theme? For example, with a normal you can simply do <mat-checkbox color="primary">. However something like <mat-list-option color="primary"> does not seem to have any effect.

I couldn't find anything about this in the Angular Material API reference but surely there's a way besides changing the color manually (i.e. not using the theme) like in this question?

1 Answers

Check this StackBlitz: Custom option list

Add this to your style.css file:

.mat-pseudo-checkbox::after {
    color: red;
}

.mat-pseudo-checkbox {
    background: lightblue;
}
Related