prebuilt theme overriding customized settings after upgrading legacy material to MDC

240 Views Asked by At

After upgrading to Angular 15 I ended up using legacy material and including a legacy pre-built theme in angular.json:

"styles": [
                            "./node_modules/@angular/material/legacy-prebuilt-themes/legacy-indigo-pink.css",
                            "projects/shared/src/my-global-settings.scss"
]

The application was working fine. Whatever I defined in my-global-settings.scss took precedence over the prebuilt theme. After upgrading all the components to mdc however, the settings in the prebuilt theme override my custom settings. Updated angular.json:

"styles": [
                            "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
                            "projects/shared/src/my-global-settings.scss"
]
0

There are 0 best solutions below