I want to change both the background and text color of a Material badge instead of using the standard material color, how do I do this?
<mat-icon matBadge="{{this.userService.numberOfCartItems}}"
matBadgePosition="above after" matBadgeColor="accent">
shopping_cart
</mat-icon>
You can change the background and color properties for the class mat-badge-content:
.mat-badge-content {
background: red;
color: blue;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With