Karthik Kumar
Karthik Kumar

Reputation: 777

Angular Material custom theming

The mat-core() mixin is not getting recognized by my scss file. It shows error as "Undeclared mixin".

@import '~@angular/material/_theming';
@include mat-core();

Upvotes: 4

Views: 2377

Answers (2)

Awais
Awais

Reputation: 4902

after couple of hrs spending i finally figured it out instead of this

@import '~@angular/material/theming';

USE THIS

@import '../node_modules/@angular/material/theming';

(Issue is with the path) :)

Upvotes: 4

Karthik Kumar
Karthik Kumar

Reputation: 777

Update your angular/cli version and give proper path value for importing angular theme in first line. It solved the problem

Upvotes: 0

Related Questions