| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 1 | // Toast container positioning - below AppHeader |
| 2 | .b-toaster, |
| 3 | .toast-container { |
| 4 | top: calc(#{$header-height} + #{$spacer})!important; // position below AppHeader (48px + spacing) |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 5 | } |
| 6 | |
| SurenNeware | c2862dc | 2020-09-11 18:02:42 +0530 | [diff] [blame] | 7 | // Toast component and status icon style |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 8 | .toast { |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 9 | padding: calc(#{$spacer} / 2) calc(#{$spacer} / 2) calc(#{$spacer} / 2) $spacer+2; |
| 10 | border-width: 0 0 0 3px; // physical width retained; color via logical property |
| Dixsie Wolmers | 12bc875 | 2020-09-22 09:38:28 -0500 | [diff] [blame] | 11 | box-shadow: $box-shadow; |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 12 | margin-bottom: $spacer; // vertical spacing between stacked toasts |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 13 | .close { |
| 14 | font-weight: 300; |
| 15 | opacity: 1; |
| 16 | } |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 17 | // Hide progress bar in all toasts (CSS workaround since JS props don't work as documented in Bootstrap Vue Next 0.40.8) |
| 18 | .progress { |
| 19 | display: none !important; |
| 20 | } |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | .toast-header { |
| Derick Montague | a36a32f | 2021-02-21 14:57:38 -0600 | [diff] [blame] | 24 | display: flex; |
| 25 | align-items: flex-start; |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 26 | background-color: inherit!important; //override specificity |
| 27 | border: none; |
| Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 28 | color: theme-color("dark")!important; //override specificity |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 29 | padding-bottom: calc(#{$spacer} / 4); // spacing between header and body |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 30 | } |
| 31 | |
| Derick Montague | a36a32f | 2021-02-21 14:57:38 -0600 | [diff] [blame] | 32 | .toast-icon { |
| 33 | display: flex; |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 34 | margin-inline-end: 1rem; |
| Derick Montague | a36a32f | 2021-02-21 14:57:38 -0600 | [diff] [blame] | 35 | |
| 36 | svg { |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 37 | margin-inline-start: -2.5rem; |
| Derick Montague | a36a32f | 2021-02-21 14:57:38 -0600 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | + .close { |
| 41 | line-height: .9; |
| 42 | } |
| 43 | } |
| 44 | |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 45 | .toast-body { |
| Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 46 | color: theme-color("dark"); |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 47 | padding-top: calc(#{$spacer} / 4); // spacing below header |
| 48 | white-space: pre-line; // Preserve newlines from \n characters |
| 49 | line-height: 1.6; // Better line spacing for multi-line content and timestamps |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 50 | } |
| 51 | |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 52 | // Bootstrap Vue 2 class names (backward compatibility) |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 53 | .b-toast-success .toast { |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 54 | border-inline-start-color: theme-color("success")!important; |
| Yoshie Muranaka | 1f4eaa1 | 2020-08-10 11:17:12 -0700 | [diff] [blame] | 55 | background-color: theme-color-light("success")!important; |
| Derick Montague | 4e90eed | 2020-03-03 18:11:44 -0600 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | .b-toast-info .toast { |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 59 | border-inline-start-color: theme-color("info")!important; |
| Yoshie Muranaka | 1f4eaa1 | 2020-08-10 11:17:12 -0700 | [diff] [blame] | 60 | background-color: theme-color-light("info")!important; |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | .b-toast-danger .toast { |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 64 | border-inline-start-color: theme-color("danger")!important; |
| Yoshie Muranaka | 1f4eaa1 | 2020-08-10 11:17:12 -0700 | [diff] [blame] | 65 | background-color: theme-color-light("danger")!important; |
| Yoshie Muranaka | 183c275 | 2020-02-12 11:30:49 -0800 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | .b-toast-warning .toast { |
| jason westover | d36ac8a | 2025-11-03 20:58:59 -0600 | [diff] [blame^] | 69 | border-inline-start-color: theme-color("warning")!important; |
| 70 | background-color: theme-color-light("warning")!important; |
| 71 | } |
| 72 | |
| 73 | // Bootstrap Vue Next class names |
| 74 | .toast.bg-success { |
| 75 | border-inline-start-color: theme-color("success")!important; |
| 76 | background-color: theme-color-light("success")!important; |
| 77 | } |
| 78 | |
| 79 | .toast.bg-info { |
| 80 | border-inline-start-color: theme-color("info")!important; |
| 81 | background-color: theme-color-light("info")!important; |
| 82 | } |
| 83 | |
| 84 | .toast.bg-danger { |
| 85 | border-inline-start-color: theme-color("danger")!important; |
| 86 | background-color: theme-color-light("danger")!important; |
| 87 | } |
| 88 | |
| 89 | .toast.bg-warning { |
| 90 | border-inline-start-color: theme-color("warning")!important; |
| 91 | background-color: theme-color-light("warning")!important; |
| 92 | } |
| 93 | |
| 94 | // Override Bootstrap's solid variant backgrounds |
| 95 | .toast.text-bg-success, |
| 96 | .toast.text-bg-info, |
| 97 | .toast.text-bg-danger, |
| 98 | .toast.text-bg-warning { |
| 99 | color: theme-color("dark")!important; |
| 100 | } |
| 101 | |
| 102 | .toast.text-bg-success { |
| 103 | border-inline-start-color: theme-color("success")!important; |
| 104 | background-color: theme-color-light("success")!important; |
| 105 | } |
| 106 | |
| 107 | .toast.text-bg-info { |
| 108 | border-inline-start-color: theme-color("info")!important; |
| 109 | background-color: theme-color-light("info")!important; |
| 110 | } |
| 111 | |
| 112 | .toast.text-bg-danger { |
| 113 | border-inline-start-color: theme-color("danger")!important; |
| 114 | background-color: theme-color-light("danger")!important; |
| 115 | } |
| 116 | |
| 117 | .toast.text-bg-warning { |
| 118 | border-inline-start-color: theme-color("warning")!important; |
| Yoshie Muranaka | 1f4eaa1 | 2020-08-10 11:17:12 -0700 | [diff] [blame] | 119 | background-color: theme-color-light("warning")!important; |
| Yoshie Muranaka | 0fc91e7 | 2020-02-05 11:23:06 -0800 | [diff] [blame] | 120 | } |