| 1 | .toasts { |
| 2 | position: fixed; right: 0; |
| 3 | display: flex; |
| 4 | flex-direction: column; |
| 5 | margin-top: .5em; |
| 6 | gap: .5em; |
| 7 | z-index: 1001; // more than dialog backdrop |
| 8 | } |
| 9 | .toast { |
| 10 | background: var(--faint-contrast); |
| 11 | color: var(--text-high-contrast); |
| 12 | transition: all .5s ease-in; |
| 13 | position: relative; |
| 14 | left: -.5em; |
| 15 | overflow: hidden; |
| 16 | display: flex; |
| 17 | align-items: center; |
| 18 | padding: .3em .6em; |
| 19 | border-radius: .5em; |
| 20 | box-shadow: 0 0 .3em .3em #8883; |
| 21 | box-sizing: border-box; |
| 22 | .toast-icon { margin-right: .3em; animation: zoomRotating 1.5s; } |
| 23 | &.toast-success { background-color: var(--success) } |
| 24 | &.toast-warning { background-color: var(--warning) } |
| 25 | &.toast-error { background-color: var(--error) } |
| 26 | |
| 27 | &.before { |
| 28 | left: 100%; |
| 29 | transform: scale(.1); |
| 30 | padding-top: 0; |
| 31 | padding-bottom: 0; |
| 32 | } |
| 33 | &.after { |
| 34 | height: 0 !important; |
| 35 | padding-top: 0; |
| 36 | padding-bottom: 0; |
| 37 | transition-duration: .2s; |
| 38 | transform: scale(0); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | @keyframes zoomRotating { |
| 43 | 0% { transform: scale(0); } |
| 44 | 100% { transform: scale(1) rotate(360deg); } |
| 45 | } |