Skip to content

fix(preview): theme the preview canvas via --muted token#66

Merged
zhawtof merged 2 commits into
mainfrom
claude/priceless-brahmagupta-a8bc32
May 16, 2026
Merged

fix(preview): theme the preview canvas via --muted token#66
zhawtof merged 2 commits into
mainfrom
claude/priceless-brahmagupta-a8bc32

Conversation

@zhawtof
Copy link
Copy Markdown
Contributor

@zhawtof zhawtof commented May 16, 2026

Summary

The outer preview canvas — the area framing the Slack chrome — was hard-coded to bg-[#f4f4f4] / bg-[#0e0f12], so it stayed flat grey regardless of the active brand preset. Switch it to bg-muted so presets like Cyberpunk and Ocean actually reach the canvas.

Why

Reported when running the Cyberpunk preset in dark mode: the page background went deep purple but the surrounding canvas stayed neutral grey, breaking the themed look. The --muted token already varies per preset, so routing the canvas through it is the natural fix.

The inner Slack frame (Message / Modal / App Home) intentionally still uses Slack's own canvas colors (#1a1d21 / white) via isDark, since that surface is mimicking Slack itself and shouldn't theme.

Verified

Theme Before After
Default + light #f4f4f4 #f1f5f9 (≈ unchanged)
Default + dark #0e0f12 #1e293b (dark slate)
Cyberpunk + dark #0e0f12 rgb(36,28,44) themed dark purple
Ocean + dark #0e0f12 rgb(29,39,53) themed navy

Test plan

  • pnpm typecheck
  • Spot-checked Default / Cyberpunk / Ocean in light and dark mode in the demo
  • pnpm lint
  • pnpm test

🤖 Generated with Claude Code

The outer canvas around the Slack chrome was hard-coded to #f4f4f4
(light) / #0e0f12 (dark), so brand presets like cyberpunk or ocean
never reached it — the canvas stayed flat grey regardless of theme.
Switch it to bg-muted so the active preset's muted color shows
through (e.g. dark purple for cyberpunk dark, navy for ocean dark).
The inner Slack frame intentionally still uses Slack's own canvas
colors via isDark, since that surface is mimicking Slack itself.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented May 16, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
block-kitchen 6a3123c Commit Preview URL

Branch Preview URL
May 16 2026, 05:59 PM

…magupta-a8bc32

# Conflicts:
#	src/components/surface.tsx
@zhawtof zhawtof merged commit 80d766e into main May 16, 2026
12 checks passed
@zhawtof zhawtof deleted the claude/priceless-brahmagupta-a8bc32 branch May 16, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant