In Angular, I generate a custom theme file, a root styles file, and all my components have their own custom styles file. However, since I updated to Version 10, my terminal is spammed by the warning
WARNING: The same color styles are generated multiple times. Read more about how style duplication can be avoided in a dedicated guide. https://github.com/angular/components/blob/master/guides/duplicate-theming-styles.md
node_modules/@angular/material/_theming.scss 1648:7 -mat-check-duplicate-theme-styles()
node_modules/@angular/material/_theming.scss 7010:3 angular-material-theme()
node_modules/@angular/material/_theming.scss 7061:3 angular-material-color()
src/_custom_theme.scss 242:3 @import
stdin 2:9
Following the guide, I could reduce this error to a minimum of four arrivals. This error lists my custom_theme file and @angular/material from my node_modules.
I really wonder what I'm doing wrong leading to this error. At line 242 of my custom_theme I am generating my dark theme .custom-dark-theme { @include angular-material-color($app-theme-dark); }