Issue 413
bug: 404 pages ignore the visitor's dark theme
Back to our planDone
bugfrontendstylingpriority: low
Type
bug
Summary
404 pages ignore the visitor's dark theme: they always show light.
Problem
Found while screenshotting #412. With the site set to dark, /no-such-page, /posts/page/2 and /posts/page/99 answer 404 with <html> carrying no data-theme, so the page and its header render with the light tokens. Every other page sets data-theme before first paint (InitTheme). Seen under next dev --webpack; production not checked yet.
Proposed fix
Find why the theme script doesn't apply on the not-found render (a separate layout, or the script not reaching the 404 response), and make 404s set data-theme like every other page. Add a test or check that covers a 404.
Acceptance criteria
- Not done: With the site on dark, a 404 page is dark (page and header), and with the site on light it's light, with the device in either mode.
- Not done: Checked at 320 and 1280 px.
Area
frontend
Priority
priority: low
Generated by Claude Code, opens in a new tab