fix(desktop): restore legacy webview tints and active tab background
This commit is contained in:
11 files changed
+364
-16
No files matched your search
@@ -1447,7 +1447,7 @@ onBeforeUnmount(() => {
|
||||
</div>
|
||||
|
||||
<DialogFooter v-if="!hasResults">
|
||||
<Button variant="outline" @click="handleOpenChange(false)">{{ t("common.close") }}</Button>
|
||||
<Button variant="outline" size="sm" @click="handleOpenChange(false)">{{ t("common.close") }}</Button>
|
||||
<span v-if="compareProgressLabel" class="text-xs text-muted-foreground self-center">{{ compareProgressLabel }}</span>
|
||||
<Button size="sm" :disabled="!canCompare || comparing" @click="startCompare">
|
||||
<Loader2 v-if="comparing" class="w-3.5 h-3.5 animate-spin mr-1" />
|
||||
@@ -1457,7 +1457,7 @@ onBeforeUnmount(() => {
|
||||
</DialogFooter>
|
||||
|
||||
<DialogFooter v-else class="flex items-center gap-2">
|
||||
<Button variant="outline" :disabled="(executing && manualTransaction) || resolvingTransaction" @click="handleOpenChange(false)">{{ t("common.close") }}</Button>
|
||||
<Button variant="outline" size="sm" :disabled="(executing && manualTransaction) || resolvingTransaction" @click="handleOpenChange(false)">{{ t("common.close") }}</Button>
|
||||
<Button variant="outline" size="sm" :disabled="comparing || executionLocked || !canCompare" @click="startCompare">
|
||||
<Loader2 v-if="comparing" class="w-3 h-3 animate-spin mr-1" />
|
||||
<RotateCcw v-else class="w-3 h-3 mr-1" />
|
||||
|
||||
@@ -67,6 +67,7 @@ import LightDropdown from "@/components/ui/LightDropdown.vue";
|
||||
import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { appTabActiveBackground, appTabActiveIndicator } from "@/lib/tabs/tabPresentation";
|
||||
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import DatabaseIcon from "@/components/icons/DatabaseIcon.vue";
|
||||
@@ -166,10 +167,9 @@ function specialPageTabClass(active: boolean): string[] {
|
||||
|
||||
function specialPageTabStyle(active: boolean) {
|
||||
if (!active) return undefined;
|
||||
const activeBackground = "color-mix(in srgb, var(--foreground) 18%, var(--background))";
|
||||
if (isVerticalLayout.value) return { "--app-tab-background": "var(--accent)" };
|
||||
if (!isClassicLayout.value) return { "--app-tab-background": activeBackground, borderColor: "var(--ring)" };
|
||||
return { "--app-tab-background": activeBackground, boxShadow: "inset 0 -2px 0 color-mix(in srgb, var(--foreground) 72%, transparent)" };
|
||||
if (!isClassicLayout.value) return { "--app-tab-background": appTabActiveBackground(), borderColor: "var(--ring)" };
|
||||
return { "--app-tab-background": appTabActiveBackground(), boxShadow: appTabActiveIndicator() };
|
||||
}
|
||||
const isVerticalLayout = computed(() => settingsStore.editorSettings.tabPlacement === "left" || settingsStore.editorSettings.tabPlacement === "right");
|
||||
const isWrapLayout = computed(() => !isVerticalLayout.value && settingsStore.editorSettings.tabLayout === "wrap");
|
||||
|
||||
+13
@@ -131,6 +131,19 @@ describe("EditorGroupTabBar group behavior", () => {
|
||||
beforeEach(() => {
|
||||
document.body.innerHTML = "";
|
||||
vi.restoreAllMocks();
|
||||
// Pin the engine to modern capabilities: these tests assert the designed
|
||||
// styles, not the legacy WebView fallbacks (covered in styles/__tests__).
|
||||
vi.stubGlobal("CSS", { supports: () => true });
|
||||
vi.stubGlobal("matchMedia", (query: string) => ({
|
||||
media: query,
|
||||
matches: true,
|
||||
addEventListener: () => {},
|
||||
removeEventListener: () => {},
|
||||
addListener: () => {},
|
||||
removeListener: () => {},
|
||||
dispatchEvent: () => false,
|
||||
onchange: null,
|
||||
}));
|
||||
pinia = createPinia();
|
||||
setActivePinia(pinia);
|
||||
});
|
||||
|
||||
@@ -326,7 +326,10 @@
|
||||
}
|
||||
|
||||
.app-tab-pill[data-active-tab="false"]:hover {
|
||||
background-color: var(--app-tab-hover-background, color-mix(in oklch, var(--foreground) 8%, transparent));
|
||||
/* The fallback must parse on WebKit without color-mix() (macOS 12 Safari
|
||||
* < 16.2): a color-mix() fallback would invalidate the whole declaration
|
||||
* there and uncolored tabs would get no hover feedback at all. */
|
||||
background-color: var(--app-tab-hover-background, rgba(var(--dbx-foreground-rgb), 0.08));
|
||||
}
|
||||
|
||||
.app-tab-bar:not(.vertical-tab-layout) .app-tab-pill {
|
||||
@@ -1018,6 +1021,15 @@
|
||||
background-color: var(--tab-group-soft);
|
||||
}
|
||||
|
||||
/* WebKit without color-mix() (macOS 12 Safari < 16.2) drops the color-mix
|
||||
* declarations above, leaving the active vertical tab unpainted; restore the
|
||||
* background and border over the same tokens. The composite box-shadow stays
|
||||
* out — losing it is cosmetic, and a partial shadow list is all-or-nothing. */
|
||||
html.dbx-legacy-webview .vertical-tab-layout .app-tab-pill:not(.tab-group-tab)[data-active-tab="true"] {
|
||||
background-color: rgba(var(--dbx-foreground-rgb), 0.16) !important;
|
||||
border-color: rgba(var(--dbx-foreground-rgb), 0.32) !important;
|
||||
}
|
||||
|
||||
.vertical-tab-layout .app-tab-scroll > * {
|
||||
width: 100%;
|
||||
flex: none;
|
||||
|
||||
+37
-4
@@ -685,10 +685,43 @@ describe("shared tab presentation helpers", () => {
|
||||
});
|
||||
|
||||
it("builds active/inactive color styles for classic and non-classic layouts", () => {
|
||||
const activeClassic = tabColorStyle(queryTab({}), true, true);
|
||||
expect(activeClassic?.boxShadow).toContain("var(--foreground)");
|
||||
const inactiveModern = tabColorStyle(queryTab({}), false, false);
|
||||
expect(inactiveModern?.borderColor).toBeUndefined();
|
||||
// Node has no window/CSS globals: pin both to modern-engine answers.
|
||||
vi.stubGlobal("CSS", { supports: () => true });
|
||||
vi.stubGlobal("window", {
|
||||
matchMedia: (query: string) => ({
|
||||
media: query,
|
||||
matches: true,
|
||||
addEventListener: () => {},
|
||||
removeEventListener: () => {},
|
||||
}),
|
||||
});
|
||||
try {
|
||||
const activeClassic = tabColorStyle(queryTab({}), true, true);
|
||||
expect(activeClassic?.boxShadow).toContain("var(--foreground)");
|
||||
const inactiveModern = tabColorStyle(queryTab({}), false, false);
|
||||
expect(inactiveModern?.borderColor).toBeUndefined();
|
||||
} finally {
|
||||
vi.unstubAllGlobals();
|
||||
}
|
||||
});
|
||||
|
||||
it("swaps inline color-mix tab colors for concrete rgba on legacy WebViews", () => {
|
||||
// WebKit without color-mix() invalidates the inline values at computed-value
|
||||
// time, which left the active tab with no background at all (macOS 12); and
|
||||
// it cannot substitute var() inside inline custom properties, so the legacy
|
||||
// branch resolves the token to concrete rgb. Node has no document: the
|
||||
// helper falls back to the default theme's foreground (10, 10, 10).
|
||||
vi.stubGlobal("CSS", { supports: () => false });
|
||||
try {
|
||||
const pill = tabColorStyle(queryTab({}), true, false);
|
||||
expect(pill?.["--app-tab-background"]).toBe("rgba(10, 10, 10, 0.18)");
|
||||
expect(pill?.borderColor).toBe("var(--ring)");
|
||||
const classic = tabColorStyle(queryTab({}), true, true);
|
||||
expect(classic?.["--app-tab-background"]).toBe("rgba(10, 10, 10, 0.18)");
|
||||
expect(classic?.boxShadow).toBe("inset 0 -2px 0 rgba(10, 10, 10, 0.72)");
|
||||
} finally {
|
||||
vi.unstubAllGlobals();
|
||||
}
|
||||
});
|
||||
|
||||
it("resolves MQ driver icons from the connection store", () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useConnectionStore } from "@/stores/connectionStore";
|
||||
import { useSettingsStore } from "@/stores/settingsStore";
|
||||
import { hexToRgba } from "@/lib/common/color";
|
||||
import { isLegacyWebView } from "@/lib/ui/legacyWebView";
|
||||
import type { CSSProperties } from "vue";
|
||||
import { findConnectionGroupPath } from "@/lib/sidebar/sidebarLayout";
|
||||
import { supportsConnectionDatabaseInfo } from "@/lib/connection/connectionDatabaseInfo";
|
||||
@@ -682,14 +683,38 @@ export function tabIconClass(tab: QueryTab): string {
|
||||
return "text-blue-600 dark:text-blue-400";
|
||||
}
|
||||
|
||||
// WebKit without color-mix() (macOS 12 Safari < 16.2) invalidates these inline
|
||||
// values at computed-value time, leaving the active tab with no background at
|
||||
// all — and it also fails to substitute var() references inside inline custom
|
||||
// properties, so the legacy branch resolves the theme token to concrete rgb
|
||||
// once per call instead of leaning on rgba(var(--dbx-foreground-rgb), …).
|
||||
function foregroundRgb(): string {
|
||||
if (typeof document !== "undefined") {
|
||||
const rgb = getComputedStyle(document.documentElement).getPropertyValue("--dbx-foreground-rgb").trim();
|
||||
if (rgb) return rgb;
|
||||
}
|
||||
return "10, 10, 10";
|
||||
}
|
||||
|
||||
export function appTabActiveBackground(): string {
|
||||
if (isLegacyWebView()) return `rgba(${foregroundRgb()}, 0.18)`;
|
||||
return "color-mix(in srgb, var(--foreground) 18%, var(--background))";
|
||||
}
|
||||
|
||||
export function appTabActiveIndicator(): string {
|
||||
if (isLegacyWebView()) return `inset 0 -2px 0 rgba(${foregroundRgb()}, 0.72)`;
|
||||
return "inset 0 -2px 0 color-mix(in srgb, var(--foreground) 72%, transparent)";
|
||||
}
|
||||
|
||||
export function tabColorStyle(tab: QueryTab, active: boolean, isClassic: boolean): CSSProperties | undefined {
|
||||
const activeIndicator = "inset 0 -2px 0 color-mix(in srgb, var(--foreground) 72%, transparent)";
|
||||
const activeIndicator = appTabActiveIndicator();
|
||||
const color = connectionColor(tab.connectionId);
|
||||
if (!color) {
|
||||
const background = appTabActiveBackground();
|
||||
if (isClassic) {
|
||||
return active ? { "--app-tab-background": "color-mix(in srgb, var(--foreground) 18%, var(--background))", boxShadow: activeIndicator } : undefined;
|
||||
return active ? { "--app-tab-background": background, boxShadow: activeIndicator } : undefined;
|
||||
}
|
||||
return active ? { "--app-tab-background": "color-mix(in srgb, var(--foreground) 18%, var(--background))", borderColor: "var(--ring)" } : undefined;
|
||||
return active ? { "--app-tab-background": background, borderColor: "var(--ring)" } : undefined;
|
||||
}
|
||||
if (isClassic) {
|
||||
return {
|
||||
|
||||
@@ -31,6 +31,9 @@ const desktopIndexSource = readFileSync(new URL("../../../index.html", import.me
|
||||
const connectionDialogLegacyCss = readFileSync(new URL("../../../public/connection-dialog-legacy.css", import.meta.url), "utf8");
|
||||
const legacyWebViewSource = readFileSync(new URL("../../lib/ui/legacyWebView.ts", import.meta.url), "utf8");
|
||||
const mainSource = readFileSync(new URL("../../main.ts", import.meta.url), "utf8");
|
||||
const tabPresentationSource = readFileSync(new URL("../../lib/tabs/tabPresentation.ts", import.meta.url), "utf8");
|
||||
const editorGroupTabBarSource = readFileSync(new URL("../../components/layout/EditorGroupTabBar.vue", import.meta.url), "utf8");
|
||||
const appTabBarCssSource = readFileSync(new URL("../../components/layout/appTabBar.css", import.meta.url), "utf8");
|
||||
|
||||
describe("legacy WebView CSS fallbacks", () => {
|
||||
it("keeps globals.css balanced and free of min-width media wrappers", () => {
|
||||
@@ -235,6 +238,95 @@ describe("legacy WebView CSS fallbacks", () => {
|
||||
expect(activeConnectionFilterSource).toContain("text-primary bg-primary/10 border-primary/30");
|
||||
});
|
||||
|
||||
it("keeps foreground alpha utilities readable in legacy WebViews", () => {
|
||||
// Tailwind v4 emits bg-foreground/10 as a full-color declaration with the
|
||||
// real tint behind `@supports (color: color-mix(...))`. WebKit without
|
||||
// color-mix() keeps the full-color one, so the update dialog tab badge
|
||||
// rendered as a solid near-black pill on macOS 12 (Safari < 16.2).
|
||||
expect(updateDialogSource).toContain('class="rounded-full bg-foreground/10 px-1.5 text-[11px]"');
|
||||
expect(globalsCss).toContain("html.dbx-legacy-webview .bg-foreground\\/10");
|
||||
expect(globalsCss).toContain("background-color: rgba(var(--dbx-foreground-rgb), 0.06) !important;");
|
||||
expect(globalsCss).toContain("background-color: rgba(var(--dbx-foreground-rgb), 0.1) !important;");
|
||||
expect(globalsCss).toContain("html.dbx-legacy-webview .hover\\:bg-foreground\\/10:hover");
|
||||
expect(globalsCss).toContain("html.dbx-legacy-webview .hover\\:bg-foreground\\/15:hover");
|
||||
expect(globalsCss).toContain("border-color: rgba(var(--dbx-foreground-rgb), 0.2) !important;");
|
||||
expect(globalsCss).toContain("border-color: rgba(var(--dbx-foreground-rgb), 0.8) !important;");
|
||||
});
|
||||
|
||||
it("orders foreground dark-mode fallbacks after hover fallbacks", () => {
|
||||
// hover and dark overrides tie on specificity: the later dark rule has to
|
||||
// win over the hover rule, and dark:hover has to win over both.
|
||||
const hover = globalsCss.indexOf("html.dbx-legacy-webview .hover\\:bg-foreground\\/15:hover");
|
||||
const dark = globalsCss.indexOf("html.dbx-legacy-webview.dark .dark\\:bg-foreground\\/20");
|
||||
const darkHover = globalsCss.indexOf("html.dbx-legacy-webview.dark .dark\\:hover\\:bg-foreground\\/25:hover");
|
||||
|
||||
expect(hover).toBeGreaterThan(-1);
|
||||
expect(dark).toBeGreaterThan(hover);
|
||||
expect(darkHover).toBeGreaterThan(dark);
|
||||
});
|
||||
|
||||
it("pairs every foreground theme color with a legacy rgb token", () => {
|
||||
// A theme redefining --foreground without --dbx-foreground-rgb would tint
|
||||
// legacy alpha utilities with the default theme's foreground instead.
|
||||
const foregroundDefs = globalsCss.match(/--foreground: rgb\(\d+ \d+ \d+\);/g) ?? [];
|
||||
expect(foregroundDefs.length).toBeGreaterThan(0);
|
||||
const lines = globalsCss.split("\n");
|
||||
let paired = 0;
|
||||
for (const [index, line] of lines.entries()) {
|
||||
if (/^\s*--foreground: rgb\(\d+ \d+ \d+\);$/.test(line)) {
|
||||
expect(lines[index + 1]).toMatch(/^\s*--dbx-foreground-rgb: \d+, \d+, \d+;$/);
|
||||
paired += 1;
|
||||
}
|
||||
}
|
||||
expect(paired).toBe(foregroundDefs.length);
|
||||
});
|
||||
|
||||
it("keeps warning and destructive alpha utilities readable in legacy WebViews", () => {
|
||||
// The shortcut cross-scope conflict badge (border-warning/30 bg-warning/10
|
||||
// text-warning) rendered as a solid amber pill with invisible text on
|
||||
// macOS 12 WebKit; the destructive alert badges degrade the same way.
|
||||
expect(editorSettingsDialogSource).toContain("border-warning/30 bg-warning/10");
|
||||
expect(globalsCss).toContain("--dbx-warning-rgb: 217, 119, 6;");
|
||||
expect(globalsCss).toContain("html.dbx-legacy-webview .bg-warning\\/10");
|
||||
expect(globalsCss).toContain("background-color: rgba(var(--dbx-warning-rgb), 0.1) !important;");
|
||||
expect(globalsCss).toContain("background-color: rgba(var(--dbx-warning-rgb), 0.05) !important;");
|
||||
expect(globalsCss).toContain("border-color: rgba(var(--dbx-warning-rgb), 0.3) !important;");
|
||||
expect(globalsCss).toContain("border-color: rgba(var(--dbx-warning-rgb), 0.15) !important;");
|
||||
expect(globalsCss).toContain("html.dbx-legacy-webview .bg-destructive\\/10");
|
||||
expect(globalsCss).toContain("background-color: rgba(var(--destructive-rgb), 0.1) !important;");
|
||||
expect(globalsCss).toContain("background-color: rgba(var(--destructive-rgb), 0.05) !important;");
|
||||
expect(globalsCss).toContain("border-color: rgba(var(--destructive-rgb), 0.3) !important;");
|
||||
expect(globalsCss).toContain("html.dbx-legacy-webview .focus-visible\\:bg-destructive\\/10:focus-visible");
|
||||
});
|
||||
|
||||
it("pairs every warning theme color with a legacy rgb token", () => {
|
||||
const warningDefs = globalsCss.match(/--warning: rgb\(\d+ \d+ \d+\);/g) ?? [];
|
||||
expect(warningDefs.length).toBeGreaterThan(0);
|
||||
const lines = globalsCss.split("\n");
|
||||
let paired = 0;
|
||||
for (const [index, line] of lines.entries()) {
|
||||
if (/^\s*--warning: rgb\(\d+ \d+ \d+\);$/.test(line)) {
|
||||
expect(lines[index + 1]).toMatch(/^\s*--dbx-warning-rgb: \d+, \d+, \d+;$/);
|
||||
paired += 1;
|
||||
}
|
||||
}
|
||||
expect(paired).toBe(warningDefs.length);
|
||||
});
|
||||
|
||||
it("keeps the active app tab painted in legacy WebViews", () => {
|
||||
// The active pill background is an inline custom property holding a
|
||||
// color-mix() value; on WebKit without color-mix() it invalidates at
|
||||
// computed-value time and the active tab renders with no background.
|
||||
expect(tabPresentationSource).toContain("appTabActiveBackground");
|
||||
// The legacy branch must not lean on var() inside the inline custom
|
||||
// property: old WebKit fails to substitute that, so it resolves the token.
|
||||
expect(tabPresentationSource).toContain('getPropertyValue("--dbx-foreground-rgb")');
|
||||
expect(tabPresentationSource).toContain('return "color-mix(in srgb, var(--foreground) 18%, var(--background))";');
|
||||
expect(editorGroupTabBarSource).toContain("appTabActiveBackground()");
|
||||
expect(appTabBarCssSource).toContain("var(--app-tab-hover-background, rgba(var(--dbx-foreground-rgb), 0.08))");
|
||||
expect(appTabBarCssSource).toContain('html.dbx-legacy-webview .vertical-tab-layout .app-tab-pill:not(.tab-group-tab)[data-active-tab="true"]');
|
||||
});
|
||||
|
||||
it("keeps legacy tab triggers connected to the configured corner style", () => {
|
||||
const tabsTriggerRule = globalsCss.match(/\[data-slot="tabs-trigger"\] \{([\s\S]*?)\n \}/)?.[1];
|
||||
|
||||
|
||||
@@ -331,6 +331,7 @@ html.dbx-legacy-webview input[type="number"]:not([class*="appearance-none"]):dis
|
||||
html.theme-soft {
|
||||
--background: rgb(250 251 253);
|
||||
--foreground: rgb(40 44 52);
|
||||
--dbx-foreground-rgb: 40, 44, 52;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(36 40 48);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -372,6 +373,7 @@ html.theme-soft {
|
||||
html.theme-soft.dark {
|
||||
--background: rgb(31 33 37);
|
||||
--foreground: rgb(202 206 214);
|
||||
--dbx-foreground-rgb: 202, 206, 214;
|
||||
--card: rgb(38 41 46);
|
||||
--card-foreground: rgb(202 206 214);
|
||||
--popover: rgb(42 45 51);
|
||||
@@ -413,6 +415,7 @@ html.theme-soft.dark {
|
||||
html.theme-graphite {
|
||||
--background: rgb(249 250 252);
|
||||
--foreground: rgb(42 45 51);
|
||||
--dbx-foreground-rgb: 42, 45, 51;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(39 42 48);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -454,6 +457,7 @@ html.theme-graphite {
|
||||
html.theme-graphite.dark {
|
||||
--background: rgb(30 32 36);
|
||||
--foreground: rgb(198 201 207);
|
||||
--dbx-foreground-rgb: 198, 201, 207;
|
||||
--card: rgb(38 40 45);
|
||||
--card-foreground: rgb(199 202 208);
|
||||
--popover: rgb(42 44 50);
|
||||
@@ -495,6 +499,7 @@ html.theme-graphite.dark {
|
||||
html.theme-cobalt {
|
||||
--background: rgb(247 250 253);
|
||||
--foreground: rgb(32 43 58);
|
||||
--dbx-foreground-rgb: 32, 43, 58;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(30 41 56);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -536,6 +541,7 @@ html.theme-cobalt {
|
||||
html.theme-cobalt.dark {
|
||||
--background: rgb(25 31 42);
|
||||
--foreground: rgb(198 207 219);
|
||||
--dbx-foreground-rgb: 198, 207, 219;
|
||||
--card: rgb(31 38 51);
|
||||
--card-foreground: rgb(200 209 221);
|
||||
--popover: rgb(35 43 58);
|
||||
@@ -577,6 +583,7 @@ html.theme-cobalt.dark {
|
||||
html.theme-sage {
|
||||
--background: rgb(248 250 248);
|
||||
--foreground: rgb(36 48 43);
|
||||
--dbx-foreground-rgb: 36, 48, 43;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(34 46 41);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -618,6 +625,7 @@ html.theme-sage {
|
||||
html.theme-sage.dark {
|
||||
--background: rgb(27 35 33);
|
||||
--foreground: rgb(198 208 204);
|
||||
--dbx-foreground-rgb: 198, 208, 204;
|
||||
--card: rgb(34 43 40);
|
||||
--card-foreground: rgb(200 210 206);
|
||||
--popover: rgb(38 48 45);
|
||||
@@ -659,6 +667,7 @@ html.theme-sage.dark {
|
||||
html.theme-amber {
|
||||
--background: rgb(255 252 242);
|
||||
--foreground: rgb(56 48 32);
|
||||
--dbx-foreground-rgb: 56, 48, 32;
|
||||
--card: rgb(255 255 250);
|
||||
--card-foreground: rgb(51 44 30);
|
||||
--popover: rgb(255 255 250);
|
||||
@@ -700,6 +709,7 @@ html.theme-amber {
|
||||
html.theme-amber.dark {
|
||||
--background: rgb(37 34 27);
|
||||
--foreground: rgb(217 208 188);
|
||||
--dbx-foreground-rgb: 217, 208, 188;
|
||||
--card: rgb(45 41 32);
|
||||
--card-foreground: rgb(219 210 191);
|
||||
--popover: rgb(50 46 36);
|
||||
@@ -741,6 +751,7 @@ html.theme-amber.dark {
|
||||
html.theme-blush {
|
||||
--background: rgb(255 248 251);
|
||||
--foreground: rgb(61 48 56);
|
||||
--dbx-foreground-rgb: 61, 48, 56;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(57 45 53);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -782,6 +793,7 @@ html.theme-blush {
|
||||
html.theme-blush.dark {
|
||||
--background: rgb(42 35 40);
|
||||
--foreground: rgb(221 205 214);
|
||||
--dbx-foreground-rgb: 221, 205, 214;
|
||||
--card: rgb(52 42 49);
|
||||
--card-foreground: rgb(223 207 216);
|
||||
--popover: rgb(58 47 55);
|
||||
@@ -823,6 +835,7 @@ html.theme-blush.dark {
|
||||
html.theme-vscode {
|
||||
--background: rgb(255 255 255);
|
||||
--foreground: rgb(51 51 51);
|
||||
--dbx-foreground-rgb: 51, 51, 51;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(45 45 45);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -865,6 +878,7 @@ html.theme-vscode {
|
||||
html.theme-vscode.dark {
|
||||
--background: rgb(30 30 30);
|
||||
--foreground: rgb(204 204 204);
|
||||
--dbx-foreground-rgb: 204, 204, 204;
|
||||
--card: rgb(37 37 38);
|
||||
--card-foreground: rgb(204 204 204);
|
||||
--popover: rgb(45 45 48);
|
||||
@@ -907,6 +921,7 @@ html.theme-vscode.dark {
|
||||
html.theme-idea {
|
||||
--background: rgb(250 250 250);
|
||||
--foreground: rgb(43 43 43);
|
||||
--dbx-foreground-rgb: 43, 43, 43;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(40 40 40);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -948,6 +963,7 @@ html.theme-idea {
|
||||
html.theme-idea.dark {
|
||||
--background: rgb(43 43 43);
|
||||
--foreground: rgb(187 187 187);
|
||||
--dbx-foreground-rgb: 187, 187, 187;
|
||||
--card: rgb(60 63 65);
|
||||
--card-foreground: rgb(187 187 187);
|
||||
--popover: rgb(67 70 72);
|
||||
@@ -989,6 +1005,7 @@ html.theme-idea.dark {
|
||||
html.theme-xcode {
|
||||
--background: rgb(250 252 255);
|
||||
--foreground: rgb(31 41 55);
|
||||
--dbx-foreground-rgb: 31, 41, 55;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(29 39 53);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -1030,6 +1047,7 @@ html.theme-xcode {
|
||||
html.theme-xcode.dark {
|
||||
--background: rgb(31 35 41);
|
||||
--foreground: rgb(215 221 231);
|
||||
--dbx-foreground-rgb: 215, 221, 231;
|
||||
--card: rgb(37 41 50);
|
||||
--card-foreground: rgb(216 222 232);
|
||||
--popover: rgb(45 51 59);
|
||||
@@ -1071,6 +1089,7 @@ html.theme-xcode.dark {
|
||||
html.theme-jetbrains {
|
||||
--background: rgb(248 249 251);
|
||||
--foreground: rgb(31 35 40);
|
||||
--dbx-foreground-rgb: 31, 35, 40;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(28 32 37);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -1112,6 +1131,7 @@ html.theme-jetbrains {
|
||||
html.theme-jetbrains.dark {
|
||||
--background: rgb(30 31 34);
|
||||
--foreground: rgb(223 225 229);
|
||||
--dbx-foreground-rgb: 223, 225, 229;
|
||||
--card: rgb(43 45 48);
|
||||
--card-foreground: rgb(223 225 229);
|
||||
--popover: rgb(49 51 56);
|
||||
@@ -1153,6 +1173,7 @@ html.theme-jetbrains.dark {
|
||||
html.theme-cursor {
|
||||
--background: rgb(251 252 254);
|
||||
--foreground: rgb(31 36 45);
|
||||
--dbx-foreground-rgb: 31, 36, 45;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(28 33 42);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -1194,6 +1215,7 @@ html.theme-cursor {
|
||||
html.theme-cursor.dark {
|
||||
--background: rgb(15 17 26);
|
||||
--foreground: rgb(213 215 222);
|
||||
--dbx-foreground-rgb: 213, 215, 222;
|
||||
--card: rgb(21 24 33);
|
||||
--card-foreground: rgb(214 216 223);
|
||||
--popover: rgb(27 30 39);
|
||||
@@ -1235,6 +1257,7 @@ html.theme-cursor.dark {
|
||||
html.theme-claude {
|
||||
--background: rgb(251 247 239);
|
||||
--foreground: rgb(51 43 35);
|
||||
--dbx-foreground-rgb: 51, 43, 35;
|
||||
--card: rgb(255 253 248);
|
||||
--card-foreground: rgb(48 40 32);
|
||||
--popover: rgb(255 253 248);
|
||||
@@ -1276,6 +1299,7 @@ html.theme-claude {
|
||||
html.theme-claude.dark {
|
||||
--background: rgb(33 31 28);
|
||||
--foreground: rgb(216 208 196);
|
||||
--dbx-foreground-rgb: 216, 208, 196;
|
||||
--card: rgb(42 39 35);
|
||||
--card-foreground: rgb(219 211 199);
|
||||
--popover: rgb(49 45 40);
|
||||
@@ -2092,6 +2116,151 @@ html.dbx-legacy-webview .hover\:bg-primary\/90:hover {
|
||||
background-color: rgba(var(--dbx-primary-rgb), 0.9) !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* Foreground alpha tints: Tailwind v4 emits `bg-foreground/10` as a full-color
|
||||
* declaration with the real tint inside `@supports (color: color-mix(...))`,
|
||||
* and WebKit without color-mix() (macOS 12 Safari < 16.2) keeps the full-color
|
||||
* one. The update dialog tab badge then renders as a solid near-black pill
|
||||
* instead of a 10% tint. Mirror the bg-primary fallbacks above with the
|
||||
* --dbx-foreground-rgb token defined beside every --foreground theme color.
|
||||
* Dark rules must stay after the hover rules: at equal specificity the later
|
||||
* dark-mode tint has to win, matching Tailwind's own variant order.
|
||||
*/
|
||||
html.dbx-legacy-webview .bg-foreground\/6 {
|
||||
background-color: rgba(var(--dbx-foreground-rgb), 0.06) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .bg-foreground\/10 {
|
||||
background-color: rgba(var(--dbx-foreground-rgb), 0.1) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .hover\:bg-foreground\/10:hover {
|
||||
background-color: rgba(var(--dbx-foreground-rgb), 0.1) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .hover\:bg-foreground\/15:hover {
|
||||
background-color: rgba(var(--dbx-foreground-rgb), 0.15) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview.dark .dark\:bg-foreground\/20 {
|
||||
background-color: rgba(var(--dbx-foreground-rgb), 0.2) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview.dark .dark\:hover\:bg-foreground\/25:hover {
|
||||
background-color: rgba(var(--dbx-foreground-rgb), 0.25) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-foreground\/20 {
|
||||
border-color: rgba(var(--dbx-foreground-rgb), 0.2) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-foreground\/80 {
|
||||
border-color: rgba(var(--dbx-foreground-rgb), 0.8) !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* Status alpha tints (warning/destructive): same full-color fallback problem
|
||||
* as the foreground utilities above — the base declaration is a theme var, so
|
||||
* WebKit without color-mix() (macOS 12 Safari < 16.2) paints it at full
|
||||
* opacity and alert surfaces turn into solid blocks with same-color unreadable
|
||||
* text. Palette shades need no entry here: the bundler precomputes their known
|
||||
* oklch mixes into hex-alpha literals that old WebKit parses fine. Solid
|
||||
* text and ring alpha variants stay out: solid text on the restored tint is
|
||||
* readable, and rings never worked on these WebKits anyway.
|
||||
*/
|
||||
|
||||
html.dbx-legacy-webview .active\:bg-destructive\/30:active {
|
||||
background-color: rgba(var(--destructive-rgb), 0.3) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .bg-destructive\/10 {
|
||||
background-color: rgba(var(--destructive-rgb), 0.1) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .bg-destructive\/15 {
|
||||
background-color: rgba(var(--destructive-rgb), 0.15) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .bg-destructive\/5 {
|
||||
background-color: rgba(var(--destructive-rgb), 0.05) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .bg-error\/10 {
|
||||
background-color: rgba(var(--destructive-rgb), 0.1) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .bg-warning\/10 {
|
||||
background-color: rgba(var(--dbx-warning-rgb), 0.1) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .bg-warning\/5 {
|
||||
background-color: rgba(var(--dbx-warning-rgb), 0.05) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant="destructive"]:focus {
|
||||
background-color: rgba(var(--destructive-rgb), 0.1) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .focus-visible\:bg-destructive\/10:focus-visible {
|
||||
background-color: rgba(var(--destructive-rgb), 0.1) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .focus\:bg-destructive\/10:focus {
|
||||
background-color: rgba(var(--destructive-rgb), 0.1) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .aria-invalid\:border-destructive\/55[aria-invalid="true"] {
|
||||
border-color: rgba(var(--destructive-rgb), 0.55) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .aria-invalid\:border-destructive\/70[aria-invalid="true"] {
|
||||
border-color: rgba(var(--destructive-rgb), 0.7) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-destructive\/15 {
|
||||
border-color: rgba(var(--destructive-rgb), 0.15) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-destructive\/20 {
|
||||
border-color: rgba(var(--destructive-rgb), 0.2) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-destructive\/25 {
|
||||
border-color: rgba(var(--destructive-rgb), 0.25) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-destructive\/30 {
|
||||
border-color: rgba(var(--destructive-rgb), 0.3) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-destructive\/40 {
|
||||
border-color: rgba(var(--destructive-rgb), 0.4) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-destructive\/50 {
|
||||
border-color: rgba(var(--destructive-rgb), 0.5) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-destructive\/70 {
|
||||
border-color: rgba(var(--destructive-rgb), 0.7) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-error\/30 {
|
||||
border-color: rgba(var(--destructive-rgb), 0.3) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-warning\/15 {
|
||||
border-color: rgba(var(--dbx-warning-rgb), 0.15) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .border-warning\/30 {
|
||||
border-color: rgba(var(--dbx-warning-rgb), 0.3) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview .focus-visible\:border-destructive\/40:focus-visible {
|
||||
border-color: rgba(var(--destructive-rgb), 0.4) !important;
|
||||
}
|
||||
|
||||
html.dbx-legacy-webview [data-slot="tabs"][data-orientation="horizontal"] {
|
||||
flex-direction: column !important;
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
:root {
|
||||
--background: rgb(255 255 255);
|
||||
--foreground: rgb(10 10 10);
|
||||
--dbx-foreground-rgb: 10, 10, 10;
|
||||
--card: rgb(255 255 255);
|
||||
--card-foreground: rgb(10 10 10);
|
||||
--popover: rgb(255 255 255);
|
||||
@@ -151,6 +152,7 @@
|
||||
--success-foreground: rgb(240 253 244);
|
||||
--success-bg: color-mix(in srgb, var(--success) 12%, transparent);
|
||||
--warning: rgb(217 119 6);
|
||||
--dbx-warning-rgb: 217, 119, 6;
|
||||
--warning-foreground: rgb(255 251 235);
|
||||
--warning-bg: color-mix(in srgb, var(--warning) 14%, transparent);
|
||||
--info: rgb(37 99 235);
|
||||
@@ -169,6 +171,7 @@
|
||||
.dark {
|
||||
--background: rgb(19 20 22);
|
||||
--foreground: rgb(215 215 219);
|
||||
--dbx-foreground-rgb: 215, 215, 219;
|
||||
--card: rgb(27 27 30);
|
||||
--card-foreground: rgb(215 215 219);
|
||||
--popover: rgb(30 30 32);
|
||||
@@ -204,6 +207,7 @@
|
||||
--success-foreground: rgb(20 30 24);
|
||||
--success-bg: color-mix(in srgb, var(--success) 16%, transparent);
|
||||
--warning: rgb(251 191 36);
|
||||
--dbx-warning-rgb: 251, 191, 36;
|
||||
--warning-foreground: rgb(40 32 12);
|
||||
--warning-bg: color-mix(in srgb, var(--warning) 16%, transparent);
|
||||
--info: rgb(96 165 250);
|
||||
|
||||
Reference in new issue
Block a user