diff --git a/frontend/angular.json b/frontend/angular.json index 93046453..6b75e16c 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -20,7 +20,7 @@ "outputPath": "dist/dres-frontend", "index": "src/index.html", "main": "src/main.ts", - "polyfills": "src/polyfills.ts", + "polyfills": ["zone.js"], "tsConfig": "tsconfig.app.json", "aot": true, "assets": ["src/immutable", "src/config.json"], @@ -90,7 +90,7 @@ "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", - "polyfills": "src/polyfills.ts", + "polyfills": ["zone.js"], "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", "assets": ["src/favicon.ico", "src/assets"], diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 0944abf6..b27b61ba 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -1,4 +1,6 @@ /* You can add global styles to this file, and also import other style files */ +@use '@angular/material' as mat; +@include mat.core(); html, body { @@ -59,24 +61,23 @@ app-judgement-media-viewer .mat-progress-bar-buffer { background-color: #e1bee7 !important; /* Not sure why this has to be done manually: https://material.angular.io/components/progress-bar/overview */ } -@import '@angular/material/theming'; -@include mat-core(); -$primary: mat-palette($mat-purple); -$accent: mat-palette($mat-green, A200); -$warn: mat-palette($mat-red, 500); + +$primary: mat.define-palette(mat.$purple-palette); +$accent: mat.define-palette(mat.$green-palette, A200); +$warn: mat.define-palette(mat.$red-palette, 500); /* Having access to the color palette */ .primary-color { - color: mat-color($primary) !important; + color: mat.get-color-from-palette($primary) !important; } .accent-color { - color: mat-color($accent) !important; + color: mat.get-color-from-palette($accent) !important; } .warn-color { - color: mat-color($warn) !important; + color: mat.get-color-from-palette($warn) !important; } .p1r {