From cfcd5e275a4e4f5b8949938bba463764edd24f65 Mon Sep 17 00:00:00 2001 From: Andrew Schlackman <72105194+sei-aschlackman@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:34:46 -0400 Subject: [PATCH] updated theming to be more consistent with other crucible apps --- angular.json | 3 +- .../send-text-dialog.component.html | 21 +++--- .../send-text-dialog.component.scss | 4 ++ .../send-text-dialog.component.ts | 3 +- src/styles/_theme.scss | 67 +++++++++++++++++-- src/styles/styles.scss | 1 - 6 files changed, 81 insertions(+), 18 deletions(-) diff --git a/angular.json b/angular.json index ed983c7..12a24f0 100644 --- a/angular.json +++ b/angular.json @@ -28,7 +28,8 @@ ], "styles": [ "src/styles/styles.scss", - "./node_modules/bootstrap/scss/bootstrap-utilities.scss" + "./node_modules/bootstrap/scss/bootstrap-utilities.scss", + "src/assets/vmware-wmks/css/wmks-all.css" ], "stylePreprocessorOptions": { "includePaths": [ diff --git a/src/app/components/shared/send-text-dialog/send-text-dialog.component.html b/src/app/components/shared/send-text-dialog/send-text-dialog.component.html index 6251ce4..ff48cae 100644 --- a/src/app/components/shared/send-text-dialog/send-text-dialog.component.html +++ b/src/app/components/shared/send-text-dialog/send-text-dialog.component.html @@ -16,6 +16,7 @@

{{ title }}

+ diff --git a/src/app/components/shared/send-text-dialog/send-text-dialog.component.scss b/src/app/components/shared/send-text-dialog/send-text-dialog.component.scss index 6a902cb..b559236 100644 --- a/src/app/components/shared/send-text-dialog/send-text-dialog.component.scss +++ b/src/app/components/shared/send-text-dialog/send-text-dialog.component.scss @@ -21,3 +21,7 @@ box-sizing: border-box; resize: both; } + +::ng-deep .mat-mdc-form-field-infix { + width: auto !important; +} diff --git a/src/app/components/shared/send-text-dialog/send-text-dialog.component.ts b/src/app/components/shared/send-text-dialog/send-text-dialog.component.ts index eeffb52..fd9b4a5 100644 --- a/src/app/components/shared/send-text-dialog/send-text-dialog.component.ts +++ b/src/app/components/shared/send-text-dialog/send-text-dialog.component.ts @@ -9,7 +9,7 @@ import { MatDialogActions, } from '@angular/material/dialog'; import { ComnSettingsService } from '@cmusei/crucible-common'; -import { MatInput } from '@angular/material/input'; +import { MatFormField, MatInput } from '@angular/material/input'; import { MatTooltip } from '@angular/material/tooltip'; import { MatIcon } from '@angular/material/icon'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; @@ -33,6 +33,7 @@ import { FormsModule } from '@angular/forms'; MatInput, MatDialogActions, MatButton, + MatFormField, ], }) export class SendTextDialogComponent { diff --git a/src/styles/_theme.scss b/src/styles/_theme.scss index f6ae313..0b5f398 100644 --- a/src/styles/_theme.scss +++ b/src/styles/_theme.scss @@ -5,9 +5,53 @@ // (imported above). For each palette, you can optionally specify a default, lighter, and darker // hue. Available color palettes: https://material.io/design/color/ +@use 'sass:map'; +@use '@angular/material' as mat; + +$custom-typography: mat.define-typography-config( + $font-family: '"Open Sans", sans-serif', +); +@include mat.all-component-typographies($custom-typography); + +$dark-primary-text: rgba(black, 0.87); +$light-primary-text: white; + +$cmu-palette: ( + 50: #ff3838, + 100: #ebb3b3, + 200: #e00, + 300: #d00, + 400: #c00, + 500: #b00, + 600: #a00, + 700: #900, + 800: #800, + 900: #700, + A100: #a60, + A200: #067, + A400: #247, + A700: #085, + contrast: ( + 50: $dark-primary-text, + 100: $dark-primary-text, + 200: $dark-primary-text, + 300: $dark-primary-text, + 400: $dark-primary-text, + 500: $light-primary-text, + 600: $light-primary-text, + 700: $light-primary-text, + 800: $light-primary-text, + 900: $light-primary-text, + A100: $dark-primary-text, + A200: $light-primary-text, + A400: $light-primary-text, + A700: $light-primary-text, + ), +); + // Light theme -$light-primary: mat.define-palette(mat.$red-palette); -$light-accent: mat.define-palette(mat.$blue-palette, A200, A100, A400); +$light-primary: mat.define-palette($cmu-palette); +$light-accent: mat.define-palette($cmu-palette, A400, A200, A700); // The warn palette is optional (defaults to red). $light-warn: mat.define-palette(mat.$red-palette); @@ -24,11 +68,19 @@ $light-theme: mat.define-light-theme( ) ); -// Dark theme -$dark-primary: mat.define-palette(mat.$red-palette); -$dark-accent: mat.define-palette(mat.$blue-palette, A200, A100, A400); +$light-theme-overrides: ( + 'color': ( + 'background': ( + 'background': #f1f1f2, + ), + ), +); -// The warn palette is optional (defaults to red). +$light-theme: map.deep-merge($light-theme, $light-theme-overrides); + +// Dark theme +$dark-primary: mat.define-palette($cmu-palette); +$dark-accent: mat.define-palette($cmu-palette, A400, A200, A700); $dark-warn: mat.define-palette(mat.$red-palette); // Create the theme object. A theme consists of configurations for individual @@ -43,6 +95,9 @@ $dark-theme: mat.define-dark-theme( ) ); +$dark-theme-overrides: (); +$dark-theme: map.deep-merge($dark-theme, $dark-theme-overrides); + @include mat.all-component-themes($light-theme); .dark-theme { diff --git a/src/styles/styles.scss b/src/styles/styles.scss index 6f890ef..0eb9203 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -53,5 +53,4 @@ body { } body { margin: 0; - font-family: Roboto, 'Helvetica Neue', sans-serif; }