After upgrading to Angular material 7.0.0-beta.2 we encounter following exception when building the app:
ERROR in ./trainer/assets/material/material-theme.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--15-3!./trainer/assets/material/material-theme.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
undefined
^
Wrong number of arguments (3 for 1) for `mat-elevation'
in c:\dev\FitRockApp\node_modules\@angular\material\_theming.scss (line 447, column 12)
ERROR in ./trainer/assets/theme/main.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/lib/loader.js??ref--15-3!./trainer/assets/theme/main.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
undefined
^
Wrong number of arguments (3 for 1) for `mat-elevation'
in c:\dev\FitRockApp\node_modules\@angular\material\_theming.scss (line 447, column 12)
This is caused by only importing covalent theme in our theming sass file:
@import '~@covalent/core/theming/all-theme';
This is likely related to the fact that mat-elevation has been removed from the stylesheet as mentioned in release notes for 7.0.0-beta.2
Just upgraded to angular 7.0.2 (full release) and am still experiencing this issue.
I fixed this by moving the @import '~@covalent/core/theming/all-theme'; before the @import '~@angular/material/theming';
It looks like covalent theme is overriding mat-elevation mixin.
I'm not sure if doing this has side effects, but it works for me, at least...
@vu-bui Just tested it with Angular core 7.0.0 and Angular Material 7.0.1 and that seems to work.
Most helpful comment
I fixed this by moving the
@import '~@covalent/core/theming/all-theme';before the@import '~@angular/material/theming';It looks like covalent theme is overriding mat-elevation mixin.
I'm not sure if doing this has side effects, but it works for me, at least...