Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(web): keep login card shadow from becoming a dark-mode halo

tianma-ifd81ee60c582b
diff --git a/apps/web/src/components/LoginScreen.tsx b/apps/web/src/components/LoginScreen.tsx
index 43d7a8b9..a2732be7 100644
--- a/apps/web/src/components/LoginScreen.tsx
+++ b/apps/web/src/components/LoginScreen.tsx
@@ -48,9 +48,9 @@ export const LoginScreen = ({ error, instanceUrl: initialInstanceUrl, isSubmitti
return (
<main className="flex h-[100dvh] items-center justify-center bg-[var(--workspace-canvas)] px-4 py-8 text-slate-950">
<div className="pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_15%,rgb(var(--brand-green-rgb)/0.045),transparent_42%)]" />
- <GitHubRepositoryLink className="absolute right-4 top-[max(1rem,env(safe-area-inset-top))] z-10 h-10 w-10 justify-center rounded-full border border-slate-200 bg-card/85 text-slate-600 shadow-[0_4px_16px_rgb(var(--slate-900-rgb)/0.05)] backdrop-blur transition hover:border-slate-300 hover:bg-card hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/60" iconClassName="h-5 w-5" />
-
- <section className="relative w-full max-w-[400px] rounded-2xl border border-slate-200 bg-card/95 p-8 shadow-[0_20px_50px_rgb(var(--slate-900-rgb)/0.08)] backdrop-blur-md">
+ <GitHubRepositoryLink className="absolute right-4 top-[max(1rem,env(safe-area-inset-top))] z-10 h-10 w-10 justify-center rounded-full border border-slate-200 bg-card/85 text-slate-600 backdrop-blur transition hover:border-slate-300 hover:bg-card hover:text-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-500/60" iconClassName="h-5 w-5" />
+
+ <section className="relative w-full max-w-[400px] rounded-2xl border border-slate-200 bg-card/95 p-8 shadow-[0_20px_50px_rgb(0_0_0/0.08)] backdrop-blur-md">
<div className="mb-8 flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-xl bg-emerald-500 text-white shadow-[0_8px_18px_-8px_rgb(var(--brand-green-rgb)/0.45)]">
<LockKeyhole className="h-5.5 w-5.5" />
@@ -117,11 +117,11 @@ export const LoginScreen = ({ error, instanceUrl: initialInstanceUrl, isSubmitti
/>
</label>
- <Button
+ <Button
className="h-11 w-full justify-center rounded-lg bg-emerald-500 font-semibold text-white shadow-[0_8px_20px_-8px_rgb(var(--brand-green-rgb)/0.35)] transition-colors duration-200 hover:bg-emerald-600"
- size="md"
- type="submit"
- variant="solid"
+ size="md"
+ type="submit"
+ variant="solid"
disabled={isSubmitting}
>
<LockKeyhole className="h-4 w-4 mr-1" />
diff --git a/tests/login-screen-style.test.ts b/tests/login-screen-style.test.ts
new file mode 100644
index 00000000..c4ff8161
--- /dev/null
+++ b/tests/login-screen-style.test.ts
@@ -0,0 +1,14 @@
+import { describe, expect, test } from "bun:test";
+import { readFileSync } from "node:fs";
+
+const loginScreen = readFileSync(new URL("../apps/web/src/components/LoginScreen.tsx", import.meta.url), "utf8");
+
+describe("login screen chrome", () => {
+ test("keeps the brand wash but does not use inverted-token card shadows", () => {
+ expect(loginScreen).toContain("radial-gradient");
+ expect(loginScreen).toMatch(/shadow-\[[^\]]*brand-green-rgb/);
+ expect(loginScreen).toContain("shadow-[0_20px_50px_rgb(0_0_0/0.08)]");
+ expect(loginScreen).toContain("backdrop-blur-md");
+ expect(loginScreen).not.toContain("slate-900-rgb");
+ });
+});