blob: 900794f4b52b79788d5d37007c4427a66e79f8e2 [file] [log] [blame]
jason westoverd36ac8a2025-11-03 20:58:59 -06001// Toast container positioning - below AppHeader
2.b-toaster,
3.toast-container {
4 top: calc(#{$header-height} + #{$spacer})!important; // position below AppHeader (48px + spacing)
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -08005}
6
SurenNewarec2862dc2020-09-11 18:02:42 +05307// Toast component and status icon style
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -08008.toast {
jason westoverd36ac8a2025-11-03 20:58:59 -06009 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 Wolmers12bc8752020-09-22 09:38:28 -050011 box-shadow: $box-shadow;
jason westoverd36ac8a2025-11-03 20:58:59 -060012 margin-bottom: $spacer; // vertical spacing between stacked toasts
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080013 .close {
14 font-weight: 300;
15 opacity: 1;
16 }
jason westoverd36ac8a2025-11-03 20:58:59 -060017 // 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 Muranaka0fc91e72020-02-05 11:23:06 -080021}
22
23.toast-header {
Derick Montaguea36a32f2021-02-21 14:57:38 -060024 display: flex;
25 align-items: flex-start;
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080026 background-color: inherit!important; //override specificity
27 border: none;
Yoshie Muranaka01da8182020-07-08 15:46:43 -070028 color: theme-color("dark")!important; //override specificity
jason westoverd36ac8a2025-11-03 20:58:59 -060029 padding-bottom: calc(#{$spacer} / 4); // spacing between header and body
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080030}
31
Derick Montaguea36a32f2021-02-21 14:57:38 -060032.toast-icon {
33 display: flex;
jason westoverd36ac8a2025-11-03 20:58:59 -060034 margin-inline-end: 1rem;
Derick Montaguea36a32f2021-02-21 14:57:38 -060035
36 svg {
jason westoverd36ac8a2025-11-03 20:58:59 -060037 margin-inline-start: -2.5rem;
Derick Montaguea36a32f2021-02-21 14:57:38 -060038 }
39
40 + .close {
41 line-height: .9;
42 }
43}
44
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080045.toast-body {
Yoshie Muranaka01da8182020-07-08 15:46:43 -070046 color: theme-color("dark");
jason westoverd36ac8a2025-11-03 20:58:59 -060047 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 Muranaka0fc91e72020-02-05 11:23:06 -080050}
51
jason westoverd36ac8a2025-11-03 20:58:59 -060052// Bootstrap Vue 2 class names (backward compatibility)
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080053.b-toast-success .toast {
jason westoverd36ac8a2025-11-03 20:58:59 -060054 border-inline-start-color: theme-color("success")!important;
Yoshie Muranaka1f4eaa12020-08-10 11:17:12 -070055 background-color: theme-color-light("success")!important;
Derick Montague4e90eed2020-03-03 18:11:44 -060056}
57
58.b-toast-info .toast {
jason westoverd36ac8a2025-11-03 20:58:59 -060059 border-inline-start-color: theme-color("info")!important;
Yoshie Muranaka1f4eaa12020-08-10 11:17:12 -070060 background-color: theme-color-light("info")!important;
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -080061}
62
63.b-toast-danger .toast {
jason westoverd36ac8a2025-11-03 20:58:59 -060064 border-inline-start-color: theme-color("danger")!important;
Yoshie Muranaka1f4eaa12020-08-10 11:17:12 -070065 background-color: theme-color-light("danger")!important;
Yoshie Muranaka183c2752020-02-12 11:30:49 -080066}
67
68.b-toast-warning .toast {
jason westoverd36ac8a2025-11-03 20:58:59 -060069 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 Muranaka1f4eaa12020-08-10 11:17:12 -0700119 background-color: theme-color-light("warning")!important;
Yoshie Muranaka0fc91e72020-02-05 11:23:06 -0800120}