feat(web): add two-color appearance palette #5258
Closedt3-code-bot[bot](GitHub profile, opens in a new tab)wants to merge 4 commits into
main fromagent/two-color-appearanceopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
- @@ -869,10 +880,14 @@880+ var(--theme-neutral-seed) var(--theme-control-strength),881+ transparent882+ );883+ --secondary-foreground: var(--foreground);884+ --muted: color-mix(in srgb, var(--theme-neutral-seed) var(--theme-control-strength), transparent);869885 --muted-foreground: var(--color-zinc-500);870- --accent: var(--color-zinc-100);871- --accent-foreground: var(--color-zinc-900);886+ --accent: color-mix(in srgb, var(--theme-accent-seed) var(--theme-accent-strength), transparent);887+ --accent-foreground: var(--foreground);872888 --destructive: var(--color-red-500);873- --border: var(--color-zinc-200);874- --input: var(--color-zinc-300);875- --ring: oklch(0.488 0.217 264);889+ --border: color-mix(in srgb, var(--theme-neutral-seed) var(--theme-border-strength), transparent);890+ --input: color-mix(in srgb, var(--theme-neutral-seed) var(--theme-border-strength), transparent);891+ --ring: var(--primary);876892 --destructive-foreground: var(--color-red-700);877- --info: var(--color-blue-500);878- --info-foreground: var(--color-blue-700);893+ --info: var(--primary);@@ -869,7 +874,16 @@874+ --popover: var(--card);875+ --popover-foreground: var(--foreground);876+ --primary: var(--theme-accent-seed);877+ --primary-foreground: var(--theme-accent-foreground);878+ --secondary: color-mix(879+ in srgb,880+ var(--theme-neutral-seed) var(--theme-control-strength),881+ transparent882+ );883+ --secondary-foreground: var(--foreground);884+ --muted: color-mix(in srgb, var(--theme-neutral-seed) var(--theme-control-strength), transparent);869885 --muted-foreground: var(--color-zinc-500);870- --accent: var(--color-zinc-100);871- --accent-foreground: var(--color-zinc-900);886+ --accent: color-mix(in srgb, var(--theme-accent-seed) var(--theme-accent-strength), transparent);887+ --accent-foreground: var(--foreground);872888 --destructive: var(--color-red-500);873- --border: var(--color-zinc-200);874- --input: var(--color-zinc-300);875- --ring: oklch(0.488 0.217 264);889+ --border: color-mix(in srgb, var(--theme-neutral-seed) var(--theme-border-strength), transparent);@@ -869,7 +876,16 @@876+ --primary: var(--theme-accent-seed);877+ --primary-foreground: var(--theme-accent-foreground);878+ --secondary: color-mix(879+ in srgb,880+ var(--theme-neutral-seed) var(--theme-control-strength),881+ transparent882+ );883+ --secondary-foreground: var(--foreground);884+ --muted: color-mix(in srgb, var(--theme-neutral-seed) var(--theme-control-strength), transparent);869885 --muted-foreground: var(--color-zinc-500);870- --accent: var(--color-zinc-100);871- --accent-foreground: var(--color-zinc-900);886+ --accent: color-mix(in srgb, var(--theme-accent-seed) var(--theme-accent-strength), transparent);887+ --accent-foreground: var(--foreground);872888 --destructive: var(--color-red-500);873- --border: var(--color-zinc-200);874- --input: var(--color-zinc-300);875- --ring: oklch(0.488 0.217 264);889+ --border: color-mix(in srgb, var(--theme-neutral-seed) var(--theme-border-strength), transparent);890+ --input: color-mix(in srgb, var(--theme-neutral-seed) var(--theme-border-strength), transparent);891+ --ring: var(--primary);
- @@ -0,0 +28,21 @@28+29+function resolveBrowserChromeSurface(): HTMLElement {30+ return (31+ document.querySelector<HTMLElement>("main[data-slot='sidebar-inset']") ??32+ document.querySelector<HTMLElement>("[data-slot='sidebar-inner']") ??33+ document.body34+ );35+}36+37+export function syncBrowserChromeTheme(): void {38+ if (typeof document === "undefined" || typeof getComputedStyle === "undefined") return;39+ const surfaceColor = normalizeThemeColor(40+ getComputedStyle(resolveBrowserChromeSurface()).backgroundColor,41+ );42+ const fallbackColor = normalizeThemeColor(getComputedStyle(document.body).backgroundColor);43+ const backgroundColor = surfaceColor ?? fallbackColor;44+ if (!backgroundColor) return;45+46+ document.documentElement.style.backgroundColor = backgroundColor;47+ document.body.style.backgroundColor = backgroundColor;48+ ensureThemeColorMetaTag().setAttribute("content", backgroundColor);
maria-rcks closed this
Sign in to join this conversation.


macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed