Open source CapCut alternative.
TypeScript
feat(site): paint the signed-in app surface white over the landing background
David Le7f06804892fa
diff --git a/site/src/app/app/_components/AppSurfaceBackground.tsx b/site/src/app/app/_components/AppSurfaceBackground.tsxnew file mode 100644index 00000000..9db44462--- /dev/null+++ b/site/src/app/app/_components/AppSurfaceBackground.tsx@@ -0,0 +1,17 @@+"use client";++import { useEffect } from "react";++// The signed-in /app surface renders on white, but the root html/body default to+// the cream landing background — which shows through in the browser overscroll+// area above the content. While the app is mounted we flag the html element so a+// scoped rule in globals.css paints it (and the overscroll) white instead.+export function AppSurfaceBackground() {+ useEffect(() => {+ const root = document.documentElement;+ root.classList.add("app-surface");+ return () => root.classList.remove("app-surface");+ }, []);++ return null;+}diff --git a/site/src/app/app/layout.tsx b/site/src/app/app/layout.tsxindex 1f8d38ea..6a35c7fe 100644--- a/site/src/app/app/layout.tsx+++ b/site/src/app/app/layout.tsx@@ -1,11 +1,16 @@import type { ReactNode } from "react";+import { AppSurfaceBackground } from "@/app/app/_components/AppSurfaceBackground";+// The /app surface is the signed-in product UI. Unlike the cream landing page,// it always renders on a white background and uses the same system font as the// marketing site (the --font-system token shared by the landing page).+// AppSurfaceBackground also paints the root html white so the cream landing+// background does not show through in the overscroll area.export default function AppLayout({ children }: { children: ReactNode }) {return (<div className="min-h-screen bg-white font-system text-foreground">+ <AppSurfaceBackground />{children}</div>);diff --git a/site/src/app/globals.css b/site/src/app/globals.cssindex ff5da05e..8c1d3023 100644--- a/site/src/app/globals.css+++ b/site/src/app/globals.css@@ -144,4 +144,10 @@html {@apply bg-background font-sans;}+ /* The signed-in /app surface renders on white; override the cream landing+ background on html/body so it does not show through the overscroll area. */+ html.app-surface,+ html.app-surface body {+ @apply bg-white;+ }}