Answers for "unknown function 'mat-palette'"

CSS
1

unknown function 'mat-palette'

There is another way to define it for Angular 8+

Needed imports: 
@import '~@angular/material/theming';
@use '~@angular/material' as mat;
@include mat.core();

To define a palette:
old way: $candy-app-warn:    mat-palette($mat-red);
new way: $candy-app-warn:    mat.define-palette(mat.$red-palette);

More detailed here: https://material.angular.io/guide/theming
Posted by: Guest on August-28-2021

Browse Popular Code Answers by Language