Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Studio: popups dim without blur, with a faint shadow; Settings a step darker (#13577)

Michael Hanb73110c6f7cd
diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsx
index f10544693d2..29a3de727ac 100644
--- a/studio/frontend/src/components/assistant-ui/thread.tsx
+++ b/studio/frontend/src/components/assistant-ui/thread.tsx
@@ -2417,7 +2417,7 @@ const GeneratedImageViewportOverlay: FC<{
<div className="pointer-events-none absolute inset-0 z-30">
<button
type="button"
- className="pointer-events-auto absolute inset-0 bg-background/65 backdrop-blur-[1px] dark:bg-background/55"
+ className="pointer-events-auto absolute inset-0 bg-background/65 dark:bg-background/55"
onClick={closeOverlay}
aria-label="Close generated image preview"
/>
diff --git a/studio/frontend/src/components/media-viewer.tsx b/studio/frontend/src/components/media-viewer.tsx
index 790e859f83c..da57c097e2f 100644
--- a/studio/frontend/src/components/media-viewer.tsx
+++ b/studio/frontend/src/components/media-viewer.tsx
@@ -376,7 +376,7 @@ export function MediaViewer({
}}
overlayClassName={
lightbox
- ? "media-lightbox-overlay bg-transparent supports-backdrop-filter:backdrop-blur-[1px] duration-150"
+ ? "media-lightbox-overlay bg-transparent duration-150"
: undefined
}
className={
diff --git a/studio/frontend/src/components/tauri/viewport-backdrop.ts b/studio/frontend/src/components/tauri/viewport-backdrop.ts
index 4256c80d3f9..197db7306f8 100644
--- a/studio/frontend/src/components/tauri/viewport-backdrop.ts
+++ b/studio/frontend/src/components/tauri/viewport-backdrop.ts
@@ -1,26 +1,35 @@
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
-const BACKDROP_ATTRIBUTES = ["data-state", "data-viewport-backdrop"];
+const BACKDROP_ATTRIBUTES = [
+ "data-state",
+ "data-viewport-backdrop",
+ "data-viewport-backdrop-tone",
+];
let backdropOpen = false;
+// A popup that dims darker than the standard backdrop names its tone, so the titlebar matches it.
+let backdropTone: string | null = null;
const backdropListeners = new Set<() => void>();
let bodyChildObserver: MutationObserver | null = null;
let backdropStateObserver: MutationObserver | null = null;
function readViewportBackdrop(): void {
let next = false;
+ let tone: string | null = null;
for (const child of document.body.children) {
if (
child.getAttribute("data-viewport-backdrop") === "true" &&
child.getAttribute("data-state") === "open"
) {
next = true;
- break;
+ // Stacked popups: any tone wins over none, so Settings over a dialog still darkens the titlebar.
+ tone = child.getAttribute("data-viewport-backdrop-tone") ?? tone;
}
}
- if (next === backdropOpen) return;
+ if (next === backdropOpen && tone === backdropTone) return;
backdropOpen = next;
+ backdropTone = tone;
for (const listener of backdropListeners) listener();
}
@@ -53,9 +62,14 @@ export function subscribeViewportBackdrop(listener: () => void): () => void {
bodyChildObserver = null;
backdropStateObserver = null;
backdropOpen = false;
+ backdropTone = null;
};
}
export function getViewportBackdropOpen(): boolean {
return backdropOpen;
}
+
+export function getViewportBackdropTone(): string | null {
+ return backdropTone;
+}
diff --git a/studio/frontend/src/components/tauri/window-titlebar.tsx b/studio/frontend/src/components/tauri/window-titlebar.tsx
index 993f409a7b2..08cb2426e5f 100644
--- a/studio/frontend/src/components/tauri/window-titlebar.tsx
+++ b/studio/frontend/src/components/tauri/window-titlebar.tsx
@@ -3,6 +3,7 @@
import {
getViewportBackdropOpen,
+ getViewportBackdropTone,
subscribeViewportBackdrop,
} from "@/components/tauri/viewport-backdrop";
import { useIsMobileShell } from "@/hooks/use-mobile";
@@ -33,6 +34,10 @@ function subscribeNever(): () => void {
return () => undefined;
}
+function noBackdropTone(): null {
+ return null;
+}
+
function backdropClosed(): boolean {
return false;
}
@@ -304,6 +309,11 @@ export function WindowTitlebar({
enabled ? getViewportBackdropOpen : backdropClosed,
backdropClosed,
);
+ const backdropTone = useSyncExternalStore(
+ enabled ? subscribeViewportBackdrop : subscribeNever,
+ enabled ? getViewportBackdropTone : noBackdropTone,
+ noBackdropTone,
+ );
const { pinned, togglePinned } = useSidebarPin();
// Outside SidebarProvider, so read the same media query the provider does.
const isMobile = useIsMobileShell();
@@ -502,6 +512,7 @@ export function WindowTitlebar({
data-titlebar-live-width-scope=""
data-slot="window-titlebar"
data-viewport-backdrop-open={backdropOpen ? "" : undefined}
+ data-viewport-backdrop-tone={backdropTone ?? undefined}
aria-label="Window titlebar"
>
{showSidebarSurface && (
diff --git a/studio/frontend/src/components/ui/alert-dialog.tsx b/studio/frontend/src/components/ui/alert-dialog.tsx
index 47369fb890c..942b2a93ca0 100644
--- a/studio/frontend/src/components/ui/alert-dialog.tsx
+++ b/studio/frontend/src/components/ui/alert-dialog.tsx
@@ -46,7 +46,7 @@ function AlertDialogOverlay({
data-slot="alert-dialog-overlay"
data-viewport-backdrop={true}
className={cn(
- "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/30 duration-100 supports-backdrop-filter:backdrop-blur-[2px] fixed inset-0 z-50",
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/30 duration-100 fixed inset-0 z-50",
className,
)}
{...props}
diff --git a/studio/frontend/src/components/ui/dialog.tsx b/studio/frontend/src/components/ui/dialog.tsx
index dfde28393ec..a6121b6d68a 100644
--- a/studio/frontend/src/components/ui/dialog.tsx
+++ b/studio/frontend/src/components/ui/dialog.tsx
@@ -64,7 +64,7 @@ function DialogOverlay({
data-slot="dialog-overlay"
data-viewport-backdrop={position === "fixed" ? true : undefined}
className={cn(
- "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/30 supports-backdrop-filter:backdrop-blur-[2px] duration-100 inset-0 isolate z-50",
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/30 duration-100 inset-0 isolate z-50",
position === "fixed" ? "fixed" : "absolute",
className,
)}
@@ -81,6 +81,7 @@ function DialogContent({
position = "fixed",
overlayClassName,
overlayPosition,
+ overlayTone,
onInteractOutside,
...props
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
@@ -89,6 +90,8 @@ function DialogContent({
position?: "fixed" | "absolute";
overlayClassName?: string;
overlayPosition?: "fixed" | "absolute";
+ /** A darker overlay names it, so the custom titlebar dims to match. */
+ overlayTone?: "strong";
}) {
const resolvedContainer = container ?? null;
const inheritedGlow = useContext(DropdownGlowContext);
@@ -102,6 +105,7 @@ function DialogContent({
<DialogOverlay
className={overlayClassName}
position={overlayPosition ?? position}
+ data-viewport-backdrop-tone={overlayTone}
/>
<DialogPrimitive.Content
data-slot="dialog-content"
diff --git a/studio/frontend/src/components/ui/sheet.tsx b/studio/frontend/src/components/ui/sheet.tsx
index b68fef7d92f..73b3ad7c266 100644
--- a/studio/frontend/src/components/ui/sheet.tsx
+++ b/studio/frontend/src/components/ui/sheet.tsx
@@ -71,7 +71,7 @@ function SheetOverlay({
data-slot="sheet-overlay"
data-viewport-backdrop={position === "fixed" ? true : undefined}
className={cn(
- "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/30 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-[2px] inset-0 z-50",
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/30 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 inset-0 z-50",
position === "fixed" ? "fixed" : "absolute",
className,
)}
diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsx
index 594fafef3ae..c3235b918d5 100644
--- a/studio/frontend/src/features/chat/chat-page.tsx
+++ b/studio/frontend/src/features/chat/chat-page.tsx
@@ -406,7 +406,7 @@ function BrowserOverlay(): ReactElement {
};
return (
<div
- className="fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm sm:p-4"
+ className="fixed inset-0 z-50 flex items-center justify-center bg-background/80 sm:p-4"
onMouseDown={(event) => {
if (event.target === event.currentTarget) {
useBrowserStore.getState().closePanel();
diff --git a/studio/frontend/src/features/chat/chat-providers-dialog.tsx b/studio/frontend/src/features/chat/chat-providers-dialog.tsx
index 9495e933c50..628b53417a8 100644
--- a/studio/frontend/src/features/chat/chat-providers-dialog.tsx
+++ b/studio/frontend/src/features/chat/chat-providers-dialog.tsx
@@ -2426,7 +2426,7 @@ export function ChatProvidersDialog({
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent
- overlayClassName="bg-black/50 backdrop-blur-sm"
+ overlayClassName="bg-black/50"
className="flex max-h-[90dvh] w-[96vw] flex-col gap-0 overflow-y-auto p-8 sm:max-w-none md:max-w-[calc(44rem*var(--ui-space-scale,1))]"
>
<DialogHeader className="sr-only">
diff --git a/studio/frontend/src/features/data-recipes/pages/data-recipes-page.tsx b/studio/frontend/src/features/data-recipes/pages/data-recipes-page.tsx
index 0737365900e..5845c824c97 100644
--- a/studio/frontend/src/features/data-recipes/pages/data-recipes-page.tsx
+++ b/studio/frontend/src/features/data-recipes/pages/data-recipes-page.tsx
@@ -561,7 +561,7 @@ export function DataRecipesPage(): ReactElement {
<Dialog open={learningDialogOpen} onOpenChange={setLearningDialogOpen}>
<DialogContent
className="sm:max-w-5xl"
- overlayClassName="bg-background/45 supports-backdrop-filter:backdrop-blur-[1px]"
+ overlayClassName="bg-background/45"
>
<DialogHeader>
<DialogTitle>Learning Recipes</DialogTitle>
diff --git a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx
index 02cd80a64eb..8a801c7f1cd 100644
--- a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx
+++ b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx
@@ -2510,7 +2510,7 @@ export function DiffusionTrainPanel({
{/* Confirm-stop dialog: Continue / Stop / Stop and save. */}
<AlertDialog open={stopDialogOpen} onOpenChange={setStopDialogOpen}>
- <AlertDialogContent overlayClassName="bg-background/40 supports-backdrop-filter:backdrop-blur-[1px]">
+ <AlertDialogContent overlayClassName="bg-background/40">
<AlertDialogHeader>
<AlertDialogTitle>Stop training?</AlertDialogTitle>
<AlertDialogDescription>
diff --git a/studio/frontend/src/features/settings/settings-dialog.tsx b/studio/frontend/src/features/settings/settings-dialog.tsx
index 8a93a0afb35..ac414e09231 100644
--- a/studio/frontend/src/features/settings/settings-dialog.tsx
+++ b/studio/frontend/src/features/settings/settings-dialog.tsx
@@ -474,7 +474,8 @@ export function SettingsDialog() {
<DialogContent
data-settings-dialog
showCloseButton={false}
- overlayClassName="bg-black/30 supports-backdrop-filter:backdrop-blur-[2px]"
+ overlayClassName="bg-black/40"
+ overlayTone="strong"
onCloseAutoFocus={(e) => {
// radix loses its previous-focus reference when the tab focus runs in requestAnimationFrame.
const focusTarget = [opener, openerFallback].find(
diff --git a/studio/frontend/src/features/studio/sections/document-upload-redirect-dialog.tsx b/studio/frontend/src/features/studio/sections/document-upload-redirect-dialog.tsx
index a67d6218711..88c7ce5d58b 100644
--- a/studio/frontend/src/features/studio/sections/document-upload-redirect-dialog.tsx
+++ b/studio/frontend/src/features/studio/sections/document-upload-redirect-dialog.tsx
@@ -42,7 +42,7 @@ export function DocumentUploadRedirectDialog({
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent
className="sm:max-w-lg"
- overlayClassName="bg-background/45 supports-backdrop-filter:backdrop-blur-[1px]"
+ overlayClassName="bg-background/45"
>
<DialogHeader className="gap-3">
<div className="flex items-center gap-2">
diff --git a/studio/frontend/src/features/studio/sections/progress-section.tsx b/studio/frontend/src/features/studio/sections/progress-section.tsx
index 644336c8ceb..ec2e9b8ff8d 100644
--- a/studio/frontend/src/features/studio/sections/progress-section.tsx
+++ b/studio/frontend/src/features/studio/sections/progress-section.tsx
@@ -692,7 +692,7 @@ function TrainingHeaderActions({
</Button>
<AlertDialogContent
className="w-max max-w-[95vw]"
- overlayClassName="bg-background/40 supports-backdrop-filter:backdrop-blur-[1px]"
+ overlayClassName="bg-background/40"
>
<AlertDialogHeader>
<AlertDialogTitle>{t("studio.training.stopTitle")}</AlertDialogTitle>
diff --git a/studio/frontend/src/features/studio/training-start-overlay.tsx b/studio/frontend/src/features/studio/training-start-overlay.tsx
index b9989168129..3f8de83434e 100644
--- a/studio/frontend/src/features/studio/training-start-overlay.tsx
+++ b/studio/frontend/src/features/studio/training-start-overlay.tsx
@@ -394,7 +394,7 @@ export function TrainingStartOverlay({
>
<HugeiconsIcon icon={Cancel01Icon} className="size-3.5" />
</Button>
- <AlertDialogContent overlayClassName="bg-background/40 supports-backdrop-filter:backdrop-blur-[1px]">
+ <AlertDialogContent overlayClassName="bg-background/40">
<AlertDialogHeader>
<AlertDialogTitle>{t("studio.training.cancelTitle")}</AlertDialogTitle>
<AlertDialogDescription>
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index b00ba0c87c0..ad8d89039df 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -29,14 +29,16 @@
z-index: 90;
pointer-events: none;
background: rgb(0 0 0 / 30%);
- -webkit-backdrop-filter: blur(2px);
- backdrop-filter: blur(2px);
opacity: 0;
transition: opacity 100ms;
}
[data-slot="window-titlebar"][data-viewport-backdrop-open]::after {
opacity: 1;
}
+ /* Settings dims a step darker than other popups; the titlebar repeats its backdrop. */
+ [data-slot="window-titlebar"][data-viewport-backdrop-tone="strong"]::after {
+ background: rgb(0 0 0 / 40%);
+ }
/* The surface the sidebar panel actually paints. The collapsed icon rail
repaints it, so gradients fading into the panel must read this rather
@@ -219,6 +221,8 @@
}
:root {
+ /* Every popup surface: a faint lift off the dimmed page. */
+ --popup-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.16), 0 2px 6px -2px rgb(0 0 0 / 0.06);
/* Animation timing */
--duration-micro: 100ms;
--duration-fast: 150ms;
@@ -440,6 +444,8 @@
}
.dark {
+ /* A faint shadow needs more alpha to read on a dark page. */
+ --popup-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.7);
/* Dark surfaces shared by ALL palettes: #181818 page, elevated #272727
sidebar/cards, #3a3a3a hover, #dfdfdf ink. Palette dark blocks override
only accent tokens so dark mode stays consistent across themes. */
@@ -1840,6 +1846,14 @@ html[data-contrast-adjust].dark .hub-page :is([class*="bg-background"], [class*=
/* Code font size: only overrides when the user sets an explicit size, so the
per-element Tailwind sizes stay authoritative by default. */
+/* Unlayered so a surface's own shadow (or shadow-none) cannot drop it; the ring keeps its edge. */
+:is([data-slot="dialog-content"], [data-slot="alert-dialog-content"], [data-slot="sheet-content"]) {
+ box-shadow:
+ var(--tw-ring-offset-shadow, 0 0 #0000),
+ var(--tw-ring-shadow, 0 0 #0000),
+ var(--popup-shadow);
+}
+
html[data-code-font-size] :is(pre, code, kbd, samp),
html[data-code-font-size] .aui-reasoning-code-lines {
font-size: var(--custom-code-font-size) !important;
diff --git a/studio/frontend/tests/popup-backdrop-no-blur.test.ts b/studio/frontend/tests/popup-backdrop-no-blur.test.ts
new file mode 100644
index 00000000000..ac994c7f80a
--- /dev/null
+++ b/studio/frontend/tests/popup-backdrop-no-blur.test.ts
@@ -0,0 +1,77 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+// Popups dim what is behind them but never blur it, including the titlebar layer that repeats the backdrop.
+
+import assert from "node:assert/strict";
+import { readdirSync, readFileSync, statSync } from "node:fs";
+import { join } from "node:path";
+import test from "node:test";
+import { fileURLToPath } from "node:url";
+
+const SRC = fileURLToPath(new URL("../src/", import.meta.url));
+const read = (path: string) => readFileSync(join(SRC, path), "utf8");
+const BLUR = /backdrop-blur(?!-(?:none|0)\b)|backdrop-filter:\s*blur/;
+
+function sources(dir: string): string[] {
+ return readdirSync(join(SRC, dir)).flatMap((name) => {
+ const path = join(dir, name);
+ if (statSync(join(SRC, path)).isDirectory()) return sources(path);
+ return /\.tsx?$/.test(name) ? [path] : [];
+ });
+}
+
+test("the shared dialog, alert dialog and sheet overlays do not blur", () => {
+ for (const file of ["components/ui/dialog.tsx", "components/ui/alert-dialog.tsx", "components/ui/sheet.tsx"]) {
+ assert.doesNotMatch(read(file), /backdrop-blur/, file);
+ }
+});
+
+test("no dialog passes a blurring overlay", () => {
+ for (const file of sources(".")) {
+ for (const match of read(file).matchAll(/overlayClassName=\{?["`]([^"`]*)["`]/g)) {
+ assert.doesNotMatch(match[1], BLUR, `${file}: ${match[1]}`);
+ }
+ }
+});
+
+test("lightboxes, the browser panel and the titlebar backdrop do not blur", () => {
+ assert.doesNotMatch(read("components/media-viewer.tsx"), /media-lightbox-overlay[^"]*backdrop-blur/);
+ assert.match(
+ read("components/assistant-ui/thread.tsx"),
+ /className="pointer-events-auto absolute inset-0 bg-background\/65 dark:bg-background\/55"/,
+ );
+ assert.match(
+ read("features/chat/chat-page.tsx"),
+ /className="fixed inset-0 z-50 flex items-center justify-center bg-background\/80 sm:p-4"/,
+ );
+ const css = read("index.css");
+ const titlebar = css.slice(css.indexOf('[data-slot="window-titlebar"]::after {'));
+ assert.doesNotMatch(titlebar.slice(0, titlebar.indexOf("}")), /backdrop-filter/);
+});
+
+test("Settings dims a step darker, titlebar included", () => {
+ assert.match(
+ read("features/settings/settings-dialog.tsx"),
+ /overlayClassName="bg-black\/40"\s*overlayTone="strong"/,
+ );
+ assert.match(read("components/ui/dialog.tsx"), /data-viewport-backdrop-tone=\{overlayTone\}/);
+ assert.match(
+ read("components/tauri/window-titlebar.tsx"),
+ /data-viewport-backdrop-tone=\{backdropTone \?\? undefined\}/,
+ );
+ assert.match(
+ read("index.css"),
+ /\[data-slot="window-titlebar"\]\[data-viewport-backdrop-tone="strong"\]::after \{\s*background: rgb\(0 0 0 \/ 40%\);/,
+ );
+});
+
+test("every popup surface carries the faint shadow without losing its ring", () => {
+ const css = read("index.css");
+ assert.match(css, /--popup-shadow: 0 12px 32px -12px rgb\(0 0 0 \/ 0\.16\)/);
+ assert.match(css, /--popup-shadow: 0 16px 40px -12px rgb\(0 0 0 \/ 0\.7\)/);
+ assert.match(
+ css,
+ /:is\(\[data-slot="dialog-content"\], \[data-slot="alert-dialog-content"\], \[data-slot="sheet-content"\]\) \{\s*box-shadow:\s*var\(--tw-ring-offset-shadow, 0 0 #0000\),\s*var\(--tw-ring-shadow, 0 0 #0000\),\s*var\(--popup-shadow\);/,
+ );
+});
diff --git a/studio/frontend/tests/viewport-backdrop-store.test.ts b/studio/frontend/tests/viewport-backdrop-store.test.ts
index 139ad5c83e8..b742ea7807e 100644
--- a/studio/frontend/tests/viewport-backdrop-store.test.ts
+++ b/studio/frontend/tests/viewport-backdrop-store.test.ts
@@ -57,7 +57,7 @@ Object.assign(globalThis, {
MutationObserver: FakeMutationObserver,
});
-const { getViewportBackdropOpen, subscribeViewportBackdrop } = await import(
+const { getViewportBackdropOpen, getViewportBackdropTone, subscribeViewportBackdrop } = await import(
"../src/components/tauri/viewport-backdrop.ts"
);
@@ -198,7 +198,11 @@ test("only the body's own children are watched, never a subtree", (t) => {
for (const { init } of stateObserver().targets) {
assert.deepEqual(init, {
attributes: true,
- attributeFilter: ["data-state", "data-viewport-backdrop"],
+ attributeFilter: [
+ "data-state",
+ "data-viewport-backdrop",
+ "data-viewport-backdrop-tone",
+ ],
});
}
for (const entry of connected()) {
@@ -206,6 +210,42 @@ test("only the body's own children are watched, never a subtree", (t) => {
}
});
+test("an open backdrop reports its tone, and a plain one none", (t) => {
+ reset();
+ const strong = new FakeElement({
+ "data-slot": "dialog-overlay",
+ "data-viewport-backdrop": "true",
+ "data-viewport-backdrop-tone": "strong",
+ "data-state": "open",
+ });
+ children.push(strong);
+ const unsubscribe = subscribeViewportBackdrop(() => undefined);
+ assert.equal(getViewportBackdropOpen(), true);
+ assert.equal(getViewportBackdropTone(), "strong");
+ unsubscribe();
+ assert.equal(getViewportBackdropTone(), null);
+ reset();
+ children.push(viewportBackdrop("open"));
+ t.after(subscribeViewportBackdrop(() => undefined));
+ assert.equal(getViewportBackdropTone(), null);
+});
+
+test("a strong backdrop stacked over a plain one still reports its tone", (t) => {
+ reset();
+ children.push(
+ viewportBackdrop("open"),
+ new FakeElement({
+ "data-slot": "dialog-overlay",
+ "data-viewport-backdrop": "true",
+ "data-viewport-backdrop-tone": "strong",
+ "data-state": "open",
+ }),
+ );
+ t.after(subscribeViewportBackdrop(() => undefined));
+ assert.equal(getViewportBackdropOpen(), true);
+ assert.equal(getViewportBackdropTone(), "strong");
+});
+
test("both observers go when the last listener goes", (t) => {
reset();
const first = subscribeViewportBackdrop(() => undefined);