Skip to content

Open source CapCut alternative.

TypeScript

feat(site): backlight dark landing panels in dark

David Leeb4448e3c46a
diff --git a/.claude/skills/ui-quality/references/checks.md b/.claude/skills/ui-quality/references/checks.md
index 65500eea..df40d8f1 100644
--- a/.claude/skills/ui-quality/references/checks.md
+++ b/.claude/skills/ui-quality/references/checks.md
@@ -10,7 +10,7 @@ The root uses the system preference until an explicit `.light` or `.dark` theme
`ink`, `cream`, and `coral` are fixed brand colors. Pair fixed pastel cards with their intended ink. A `light` element and everything inside it keep the light tokens and skip `dark:` utilities. Files are light elements: note paper, its menus, and every file tile look the same in both themes, and only the chrome around them goes dark.
-A dark-mode change leaves light mode pixel-identical. Keep the light value and add the dark one beside it, as in `text-[#454545] dark:text-foreground/70`.
+A dark panel on a dark page takes `backlight`, or `backlight-image` for a picture with its own corners. A dark-mode change leaves light mode pixel-identical. Keep the light value and add the dark one beside it, as in `text-[#454545] dark:text-foreground/70`.
Use [Button](../../../../site/src/components/ui/button.tsx), Input, Dialog, Popover, and DropdownMenu from the same UI directory. They carry focus, invalid, disabled, expanded, portal, and positioning behavior. Compose with `cn` and Tailwind responsive variants. Feature CSS belongs beside its owner; inline styles carry genuinely runtime values, such as data-derived CSS variables.
diff --git a/site/src/app/cut/_components/landing/CutFinalCTA.tsx b/site/src/app/cut/_components/landing/CutFinalCTA.tsx
index de76f53e..60101cfa 100644
--- a/site/src/app/cut/_components/landing/CutFinalCTA.tsx
+++ b/site/src/app/cut/_components/landing/CutFinalCTA.tsx
@@ -13,7 +13,7 @@ export function CutFinalCTA() {
>
<div className="relative">
<div className="absolute inset-0 translate-x-2 translate-y-2 rounded-3xl bg-coral" />
- <div className="relative rounded-3xl border-2 border-ink bg-ink px-6 py-10 text-center text-white md:px-12 md:py-20">
+ <div className="backlight relative rounded-3xl border-2 border-ink bg-ink px-6 py-10 text-center text-white md:px-12 md:py-20">
<div className="absolute -top-[10px] left-1/2 h-[18px] w-20 -translate-x-1/2 -rotate-2 rounded-[3px] border-2 border-ink bg-coral" />
<h2 className="mb-4 text-[clamp(36px,5.5vw,64px)] leading-[0.95] font-medium tracking-[-0.02em]">
Finally, a video editor{" "}
diff --git a/site/src/app/cut/_components/landing/CutLocal.tsx b/site/src/app/cut/_components/landing/CutLocal.tsx
index a77ca27c..c16eb77d 100644
--- a/site/src/app/cut/_components/landing/CutLocal.tsx
+++ b/site/src/app/cut/_components/landing/CutLocal.tsx
@@ -31,7 +31,7 @@ export function CutLocal() {
</div>
<Image
alt="Donkey app icon being dragged into the Applications folder."
- className="h-auto w-full rounded-2xl"
+ className="backlight-image h-auto w-full rounded-2xl"
height={413}
src="/install/install-drag.png"
unoptimized
diff --git a/site/src/app/cut/_components/landing/CutOpenSource.tsx b/site/src/app/cut/_components/landing/CutOpenSource.tsx
index 054c5281..66cb482e 100644
--- a/site/src/app/cut/_components/landing/CutOpenSource.tsx
+++ b/site/src/app/cut/_components/landing/CutOpenSource.tsx
@@ -18,7 +18,7 @@ export function CutOpenSource() {
</p>
<div className="mt-8">
- <div className="max-w-[780px] overflow-x-auto rounded-xl bg-ink px-[18px] pt-5 pb-10 font-code text-[13px] text-white md:px-6 md:pt-6 md:pb-12 md:text-[15px]">
+ <div className="backlight max-w-[780px] overflow-x-auto rounded-xl bg-ink px-[18px] pt-5 pb-10 font-code text-[13px] text-white md:px-6 md:pt-6 md:pb-12 md:text-[15px]">
<div className="mb-4 flex items-center gap-2">
<span className="h-[10px] w-[10px] rounded-full bg-[#FF5F57]" />
<span className="h-[10px] w-[10px] rounded-full bg-[#FEBC2E]" />
diff --git a/site/src/app/globals.css b/site/src/app/globals.css
index fef6b7f6..72ecf2d2 100644
--- a/site/src/app/globals.css
+++ b/site/src/app/globals.css
@@ -137,6 +137,20 @@
/* Product pages use a white surface in light mode and the dark page surface
in dark mode. Repointing the document token covers overscroll and portaled
dialogs as soon as the app wrapper parses. */
+/* Dark mode lights a dark panel from behind so it lifts off the dark page.
+ `backlight` glows a box; `backlight-image` follows a picture's own shape. */
+@utility backlight {
+ @variant dark {
+ box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 24px 90px rgb(255 255 255 / 0.12);
+ }
+}
+
+@utility backlight-image {
+ @variant dark {
+ filter: drop-shadow(0 20px 60px rgb(255 255 255 / 0.12));
+ }
+}
+
html:has(.app-surface) {
--background: var(--app-background);
}
diff --git a/site/src/app/install/_components/InstallInstructions.tsx b/site/src/app/install/_components/InstallInstructions.tsx
index b3bd2c8b..903cef85 100644
--- a/site/src/app/install/_components/InstallInstructions.tsx
+++ b/site/src/app/install/_components/InstallInstructions.tsx
@@ -84,7 +84,7 @@ type InstallStepCardProps = {
function InstallStepCard({ step }: InstallStepCardProps) {
return (
<article style={stepCardStyle}>
- <div style={stepImageFrameStyle}>
+ <div className="backlight-image" style={stepImageFrameStyle}>
<Image
alt={step.imageAlt}
height={413}
diff --git a/site/src/cut/components/editor-mock/EditorMock.tsx b/site/src/cut/components/editor-mock/EditorMock.tsx
index b67fcd4f..04b0ffbe 100644
--- a/site/src/cut/components/editor-mock/EditorMock.tsx
+++ b/site/src/cut/components/editor-mock/EditorMock.tsx
@@ -124,8 +124,7 @@ export function EditorMock({
frame === "flat" && "shadow-[0_0_0_1px_rgba(0,0,0,0.06)]",
frame === "card" && "border-2 border-ink max-md:border-0 dark:border-white/15",
// A dark page swallows ink shadows, so raised frames glow there.
- frame !== "flat" &&
- "dark:shadow-[0_0_0_1px_rgba(255,255,255,0.06),0_24px_90px_rgba(255,255,255,0.12)]",
+ frame !== "flat" && "backlight",
)}
>
<div