|
| 1 | +@use '../../app' as app; |
| 2 | + |
1 | 3 | .app-notification { |
2 | 4 | display: flex; |
3 | 5 | justify-content: space-between; |
4 | | - align-items: center; |
| 6 | + align-items: flex-start; |
5 | 7 |
|
6 | 8 | &__content { |
7 | 9 | display: flex; |
8 | 10 | justify-content: flex-start; |
9 | 11 | align-items: center; |
10 | | - font-size: 1.125rem; |
11 | | - |
12 | | - &--info { |
13 | | - color: var(--app-notification-info); |
14 | | - } |
15 | | - |
16 | | - &--success { |
17 | | - color: var(--app-notification-success); |
18 | | - } |
19 | | - |
20 | | - &--danger { |
21 | | - color: var(--app-notification-danger); |
22 | | - } |
23 | 12 | } |
24 | 13 |
|
25 | 14 | &__icon { |
26 | | - margin-right: 0.5rem; |
| 15 | + margin-right: 0.75rem; |
27 | 16 | } |
28 | 17 |
|
29 | 18 | &__close { |
30 | 19 | cursor: pointer; |
31 | | - padding-left: 0.5rem; |
| 20 | + padding-left: 0.75rem; |
| 21 | + line-height: 0; |
32 | 22 | transition: opacity 250ms ease; |
33 | 23 |
|
34 | 24 | &:hover { |
35 | 25 | opacity: 0.8; |
36 | 26 | } |
| 27 | + } |
| 28 | +} |
37 | 29 |
|
38 | | - mat-icon { |
39 | | - vertical-align: text-bottom; |
40 | | - } |
| 30 | +.app-notification-snackbar { |
| 31 | + --mdc-snackbar-supporting-text-font: var(--mat-sys-title-medium-font); |
| 32 | + --mdc-snackbar-supporting-text-size: var(--mat-sys-title-medium-size); |
| 33 | + --mdc-snackbar-supporting-text-line-height: var(--mat-sys-title-medium-line-height); |
| 34 | + --mdc-snackbar-supporting-text-weight: var(--mat-sys-title-medium-weight); |
| 35 | + |
| 36 | + &--info { |
| 37 | + --mdc-snackbar-container-color: var(--app-notification-info-background-color); |
| 38 | + --mdc-snackbar-supporting-text-color: var(--app-notification-info-color); |
| 39 | + } |
| 40 | + |
| 41 | + &--success { |
| 42 | + --mdc-snackbar-container-color: var(--app-notification-success-background-color); |
| 43 | + --mdc-snackbar-supporting-text-color: var(--app-notification-success-color); |
| 44 | + } |
| 45 | + |
| 46 | + &--danger { |
| 47 | + --mdc-snackbar-container-color: var(--app-notification-danger-background-color); |
| 48 | + --mdc-snackbar-supporting-text-color: var(--app-notification-danger-color); |
| 49 | + } |
| 50 | +} |
| 51 | + |
| 52 | +// Hack: |
| 53 | +// Fine adjustment to position snackbar just below header. |
| 54 | +// Note that any change in header height must be reported here. |
| 55 | +.cdk-overlay-pane:has(.app-notification-snackbar) { |
| 56 | + margin-top: 65px !important; // on mobile |
| 57 | + |
| 58 | + @include app.media-breakpoint-up(md) { |
| 59 | + margin-top: 73px !important; // on desktop |
41 | 60 | } |
42 | 61 | } |
43 | 62 |
|
44 | 63 | :root { |
45 | | - --app-notification-info: rgb(158, 197, 254); |
46 | | - --app-notification-success: rgb(163, 207, 187); |
47 | | - --app-notification-danger: rgb(241, 174, 181); |
| 64 | + --app-notification-info-background-color: rgb(207, 226, 255); |
| 65 | + --app-notification-info-color: rgb(5, 44, 101); |
| 66 | + |
| 67 | + --app-notification-success-background-color: rgb(209, 231, 221); |
| 68 | + --app-notification-success-color: rgb(10, 54, 34); |
| 69 | + |
| 70 | + --app-notification-danger-background-color: rgb(248, 215, 218); |
| 71 | + --app-notification-danger-color: rgb(88, 21, 28); |
48 | 72 | } |
49 | 73 |
|
50 | 74 | .gbl-theme-dark { |
51 | | - --app-notification-info: rgb(13, 110, 253); |
52 | | - --app-notification-success: rgb(25, 135, 84); |
53 | | - --app-notification-danger: rgb(220, 53, 69); |
| 75 | + --app-notification-info-background-color: rgb(5, 44, 101); |
| 76 | + --app-notification-info-color: rgb(207, 226, 255); |
| 77 | + |
| 78 | + --app-notification-success-background-color: rgb(10, 54, 34); |
| 79 | + --app-notification-success-color: rgb(209, 231, 221); |
| 80 | + |
| 81 | + --app-notification-danger-background-color: rgb(88, 21, 28); |
| 82 | + --app-notification-danger-color: rgb(248, 215, 218); |
54 | 83 | } |
0 commit comments