feat(webui): support custom background images (#6674)

This commit is contained in:
chengyongru authored and GitHub committed 2026-11-16 22:08:55 +08:00
1 parent 92d23d2d2b
commit e91906bc3a
29 files changed
+1259 -3

No files matched your search

+14
View File
@@ -260,3 +260,17 @@ test("message lists and quotes retain their existing whitespace and scrolling",
overflowX: getComputedStyle(node).overflowX,
}))).toEqual({ display: "block", whiteSpace: "pre", overflowX: "auto" });
});
test("inline code uses a translucent surface over a custom background", async ({ page }) => {
await page.goto("/browser/fixture.html?case=code-wrapping");
const code = page.getByTestId("inline-code-wrapping").locator(".markdown-inline-code").first();
await expect(code).toBeVisible();
const original = await code.evaluate(element => getComputedStyle(element).backgroundColor);
await page.evaluate(() => { document.documentElement.dataset.customBackground = ""; });
for (let i = 0; i < 2; i++) {
await expect(code).toHaveCSS("background-color", /rgba\(.+, 0\.45\)/);
await page.evaluate(() => document.documentElement.classList.toggle("dark"));
}
await page.evaluate(() => { delete document.documentElement.dataset.customBackground; });
await expect(code).toHaveCSS("background-color", original);
});