diff --git a/mesop/web/src/app/BUILD b/mesop/web/src/app/BUILD index 0079f9a0c..0f6b54ae6 100644 --- a/mesop/web/src/app/BUILD +++ b/mesop/web/src/app/BUILD @@ -20,13 +20,6 @@ sass_library( ], ) -sass_library( - name = "theme", - srcs = [ - "_theme.scss", - ], -) - sass_external_binary( name = "styles", src = "styles.scss", @@ -36,6 +29,5 @@ sass_external_binary( sourcemap = False, deps = [ ":normalize", - ":theme", ], ) diff --git a/mesop/web/src/app/_theme.scss b/mesop/web/src/app/_theme.scss deleted file mode 100644 index 54afd44b9..000000000 --- a/mesop/web/src/app/_theme.scss +++ /dev/null @@ -1,156 +0,0 @@ -// This file was partly generated by running 'ng generate @angular/material:m3-theme'. - -@use 'sass:map'; -@use '@angular/material' as mat; - -$_palettes: ( - primary: ( - 0: #000000, - 10: #001e31, - 20: #00317b, - 25: #003f9c, - 30: #004cbe, - 35: #0052ce, - 40: #0064ff, - 50: #0077ff, - 60: #008cff, - 70: #009cff, - 80: #87d0ff, - 90: #b9e1ff, - 95: #e7f2ff, - 98: #f7f9ff, - 99: #fcfcff, - 100: #ffffff, - ), - secondary: ( - 0: #000000, - 10: #171a2c, - 20: #2c2f42, - 25: #373a4d, - 30: #434659, - 35: #4e5165, - 40: #5a5d72, - 50: #73768b, - 60: #8d8fa6, - 70: #a7aac1, - 80: #c3c5dd, - 90: #dfe1f9, - 95: #f0efff, - 98: #fbf8ff, - 99: #fefbff, - 100: #ffffff, - ), - tertiary: ( - 0: #000000, - 10: #00201c, - 20: #003731, - 25: #00443c, - 30: #005048, - 35: #005d53, - 40: #01796b, - 50: #008678, - 60: #00a392, - 70: #2dbfad, - 80: #54dbc8, - 90: #74f8e4, - 95: #b4fff1, - 98: #e5fff8, - 99: #f2fffb, - 100: #ffffff, - ), - neutral: ( - 0: #000000, - 10: #1b1b1f, - 20: #303034, - 25: #3b3b3f, - 30: #47464a, - 35: #535256, - 40: #5f5e62, - 50: #78767a, - 60: #919094, - 70: #acaaaf, - 80: #c8c6ca, - 90: #e4e1e6, - 95: #f3f0f4, - 98: #fbf8fd, - 99: #fefbff, - 100: #ffffff, - 4: #0e0e11, - 6: #131316, - 12: #1f1f23, - 17: #2a2a2d, - 22: #353438, - 24: #39393c, - 87: #dcd9de, - 92: #eae7ec, - 94: #f0edf1, - 96: #f5f2f7, - ), - neutral-variant: ( - 0: #000000, - 10: #1a1b23, - 20: #2f3038, - 25: #3a3b43, - 30: #46464f, - 35: #51525b, - 40: #5d5e67, - 50: #767680, - 60: #90909a, - 70: #abaab4, - 80: #c6c5d0, - 90: #e3e1ec, - 95: #f1effa, - 98: #fbf8ff, - 99: #fefbff, - 100: #ffffff, - ), - error: ( - 0: #000000, - 10: #410002, - 20: #690005, - 25: #7e0007, - 30: #93000a, - 35: #a80710, - 40: #ba1a1a, - 50: #de3730, - 60: #ff5449, - 70: #ff897d, - 80: #ffb4ab, - 90: #ffdad6, - 95: #ffedea, - 98: #fff8f7, - 99: #fffbff, - 100: #ffffff, - ), -); - -$_rest: ( - secondary: map.get($_palettes, secondary), - neutral: map.get($_palettes, neutral), - neutral-variant: map.get($_palettes, neutral-variant), - error: map.get($_palettes, error), -); -$_primary: map.merge(map.get($_palettes, primary), $_rest); -$_tertiary: map.merge(map.get($_palettes, tertiary), $_rest); - -$primary: $_primary; -$tertiary: $_tertiary; - -$light-theme: mat.define-theme( - ( - color: ( - theme-type: light, - primary: $_primary, - tertiary: $_tertiary, - ), - ) -); -$dark-theme: mat.define-theme( - ( - color: ( - theme-type: dark, - primary: $_primary, - tertiary: $_tertiary, - ), - ) -); diff --git a/mesop/web/src/app/styles.scss b/mesop/web/src/app/styles.scss index e887acce9..490797a78 100644 --- a/mesop/web/src/app/styles.scss +++ b/mesop/web/src/app/styles.scss @@ -2,18 +2,169 @@ @use 'sass:map'; @use 'external/npm/node_modules/@angular/material/index' as mat; -@use 'theme' as theme; // Normalize as it's expected by Angular: // https://github.com/angular/components/issues/12133 @import 'normalize'; +$_palettes: ( + primary: ( + 0: #000000, + 10: #001e31, + 20: #00317b, + 25: #003f9c, + 30: #004cbe, + 35: #0052ce, + 40: #0064ff, + 50: #0077ff, + 60: #008cff, + 70: #009cff, + 80: #87d0ff, + 90: #b9e1ff, + 95: #e7f2ff, + 98: #f7f9ff, + 99: #fcfcff, + 100: #ffffff, + ), + secondary: ( + 0: #000000, + 10: #171a2c, + 20: #2c2f42, + 25: #373a4d, + 30: #434659, + 35: #4e5165, + 40: #5a5d72, + 50: #73768b, + 60: #8d8fa6, + 70: #a7aac1, + 80: #c3c5dd, + 90: #dfe1f9, + 95: #f0efff, + 98: #fbf8ff, + 99: #fefbff, + 100: #ffffff, + ), + tertiary: ( + 0: #000000, + 10: #00201c, + 20: #003731, + 25: #00443c, + 30: #005048, + 35: #005d53, + 40: #01796b, + 50: #008678, + 60: #00a392, + 70: #2dbfad, + 80: #54dbc8, + 90: #74f8e4, + 95: #b4fff1, + 98: #e5fff8, + 99: #f2fffb, + 100: #ffffff, + ), + neutral: ( + 0: #000000, + 10: #1b1b1f, + 20: #303034, + 25: #3b3b3f, + 30: #47464a, + 35: #535256, + 40: #5f5e62, + 50: #78767a, + 60: #919094, + 70: #acaaaf, + 80: #c8c6ca, + 90: #e4e1e6, + 95: #f3f0f4, + 98: #fbf8fd, + 99: #fefbff, + 100: #ffffff, + 4: #0e0e11, + 6: #131316, + 12: #1f1f23, + 17: #2a2a2d, + 22: #353438, + 24: #39393c, + 87: #dcd9de, + 92: #eae7ec, + 94: #f0edf1, + 96: #f5f2f7, + ), + neutral-variant: ( + 0: #000000, + 10: #1a1b23, + 20: #2f3038, + 25: #3a3b43, + 30: #46464f, + 35: #51525b, + 40: #5d5e67, + 50: #767680, + 60: #90909a, + 70: #abaab4, + 80: #c6c5d0, + 90: #e3e1ec, + 95: #f1effa, + 98: #fbf8ff, + 99: #fefbff, + 100: #ffffff, + ), + error: ( + 0: #000000, + 10: #410002, + 20: #690005, + 25: #7e0007, + 30: #93000a, + 35: #a80710, + 40: #ba1a1a, + 50: #de3730, + 60: #ff5449, + 70: #ff897d, + 80: #ffb4ab, + 90: #ffdad6, + 95: #ffedea, + 98: #fff8f7, + 99: #fffbff, + 100: #ffffff, + ), +); + +$_rest: ( + secondary: map.get($_palettes, secondary), + neutral: map.get($_palettes, neutral), + neutral-variant: map.get($_palettes, neutral-variant), + error: map.get($_palettes, error), +); +$_primary: map.merge(map.get($_palettes, primary), $_rest); +$_tertiary: map.merge(map.get($_palettes, tertiary), $_rest); + +$primary: $_primary; +$tertiary: $_tertiary; + +$light-theme: mat.define-theme( + ( + color: ( + theme-type: light, + primary: $_primary, + tertiary: $_tertiary, + ), + ) +); +$dark-theme: mat.define-theme( + ( + color: ( + theme-type: dark, + primary: $_primary, + tertiary: $_tertiary, + ), + ) +); + @include mat.all-component-typographies(); @include mat.core(); body { - @include mat.all-component-themes(theme.$light-theme); - @include mat.color-variants-backwards-compatibility(theme.$light-theme); + @include mat.all-component-themes($light-theme); + @include mat.color-variants-backwards-compatibility($light-theme); } html,