diff --git a/components/ui/toast/index.ts b/components/ui/toast/index.ts
index 88aa7f5d9..0f6eba04f 100644
--- a/components/ui/toast/index.ts
+++ b/components/ui/toast/index.ts
@@ -16,7 +16,7 @@ import type { VariantProps } from "class-variance-authority"
import { cva } from "class-variance-authority"
export const toastVariants = cva(
- "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--reka-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--reka-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
+ "group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--reka-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--reka-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-left-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
{
variants: {
variant: {
diff --git a/layouts/components/MainContent.vue b/layouts/components/MainContent.vue
index 2109fb169..42eb6bc73 100644
--- a/layouts/components/MainContent.vue
+++ b/layouts/components/MainContent.vue
@@ -21,22 +21,23 @@ const { rightSidebarOpen, setRightSidebarOpen } = useRightSidebar();
// Publish the height of the bottom dock (e.g. MatchAdminBottomBar teleports
// into #main-bottom-dock) as a CSS variable so fixed bottom chrome — like the
// floating SettingsSaveBar — can lift itself above it. Defaults to 0 when the
-// dock is empty / on pages without one.
+// dock is empty / on pages without one. Its left edge is the content column's
+// (past the left nav), which is where toasts line up.
const bottomDock = ref(null);
let dockRO: ResizeObserver | null = null;
-function publishDockHeight() {
+function publishDockBox() {
const h = bottomDock.value?.offsetHeight ?? 0;
- document.documentElement.style.setProperty(
- "--main-bottom-dock-height",
- `${h}px`,
- );
+ const left = bottomDock.value?.getBoundingClientRect().left ?? 0;
+ const root = document.documentElement.style;
+ root.setProperty("--main-bottom-dock-height", `${h}px`);
+ root.setProperty("--main-content-left", `${left}px`);
}
onMounted(() => {
- publishDockHeight();
+ publishDockBox();
if (typeof ResizeObserver !== "undefined" && bottomDock.value) {
- dockRO = new ResizeObserver(() => publishDockHeight());
+ dockRO = new ResizeObserver(() => publishDockBox());
dockRO.observe(bottomDock.value);
}
});
@@ -44,6 +45,7 @@ onMounted(() => {
onBeforeUnmount(() => {
dockRO?.disconnect();
document.documentElement.style.removeProperty("--main-bottom-dock-height");
+ document.documentElement.style.removeProperty("--main-content-left");
});
// Inject values from default.vue