Skip to content

Build your personal knowledge base with Trilium Notes

fix(toast): keep toasts visible outside the Next theme (closes #10839)

Elian Doran3e8fd24b6ead
diff --git a/apps/client/src/stylesheets/theme-next/base.css b/apps/client/src/stylesheets/theme-next/base.css
index 7e6beaed4f..15cb0b59bf 100644
--- a/apps/client/src/stylesheets/theme-next/base.css
+++ b/apps/client/src/stylesheets/theme-next/base.css
@@ -570,8 +570,6 @@ li.dropdown-item a.dropdown-item-button:focus-visible {
--modal-control-button-background: var(--toast-close-button-background);
--modal-control-button-color: var(--bs-toast-color);
- display: flex;
- flex-direction: column;
backdrop-filter: blur(6px);
}
diff --git a/apps/client/src/widgets/Toast.css b/apps/client/src/widgets/Toast.css
index 5443c102b5..0471718890 100644
--- a/apps/client/src/widgets/Toast.css
+++ b/apps/client/src/widgets/Toast.css
@@ -10,9 +10,14 @@
contain: none;
}
-.toast {
+/* Scoped to the container so the `display` beats Bootstrap's `.toast:not(.show) { display: none }` —
+ the toast is rendered by Preact and never carries Bootstrap's `show` class, so without this the
+ layout comes from whichever theme happens to define it, and toasts vanish under every other one. */
+#toast-container .toast {
--bs-toast-bg: var(--accented-background-color);
--bs-toast-color: var(--main-text-color);
+ display: flex;
+ flex-direction: column;
z-index: 9999999999 !important;
pointer-events: all;
overflow: hidden;