Skip to content

feat: 🎸 adapt phone schematic animation to dark mode - #356

Merged
flexbox merged 2 commits into
mainfrom
t3code/improve-phone-svg-animation-dark-mode
Sep 19, 2026
Merged

flexbox merged 2 commits into
mainfrom
t3code/improve-phone-svg-animation-dark-mode

Conversation

@flexbox

@flexbox flexbox commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Theme the phone schematic through CSS custom properties on .ps-figure (--ps-grid, --ps-frame, --ps-glow, --ps-screen-ring), with a prefers-color-scheme: dark override so the grid drops back instead of reading as a dense mesh on the dark sheet.
  • Add a data-glow radial halo behind the handset, invisible in light mode and a soft backlight in dark mode so the black screen does not vanish into the black page; it lands at the same 1900ms delay as the screen.
  • Replace the screen slot's data-fade with a data-screen OLED wake animation (brightness overshoot plus a small bloom scale), and add an inset hairline ring at the glass edge.
  • Generalise ps-fade to land on var(--ps-to, 1) so dimmed parts of the drawing (frame, dimension labels, callouts) keep their intended weight instead of snapping to full ink; per-element opacity attributes move into --ps-to.
  • Extend the prefers-reduced-motion block to cover the new data-glow and data-screen states, and lower stroke opacity on the drawn chassis/screen/button paths so dark-mode ink stays balanced.
  • Pass dark:text-blue-400 to PodcastPhonePreview on the partenaires hero so currentColor drives the ink and halo in dark mode.

Testing

  • Updated phone-schematic.spec.tsx to query the screen slot via div[data-screen] instead of div[data-fade]; test suite not run.
  • Visual check of the partenaires hero in light and dark mode: Not run.
  • prefers-reduced-motion: reduce end-state check (drawing, halo and screen all settled, no animation): Not run.

- theme grid, frame and ink opacity via CSS variables per color scheme
- add backlight halo and glass hairline so the phone reads on a dark sheet
- replace the screen fade with an OLED-style wake animation
- honor prefers-reduced-motion for the new glow and screen states
@vercel

vercel Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
banner-preview Ready Ready Preview Sep 19, 2026 9:07pm UTC
design-weshipit-today Ready Ready Preview Sep 19, 2026 9:07pm UTC
next-davidl-fr Ready Ready Preview Sep 19, 2026 9:07pm UTC
weshipit-today Ready Ready Preview Sep 19, 2026 9:07pm UTC

- swap canvas ink/grid/fill palette from `prefers-color-scheme`, repainting when the OS theme flips
- add a dark-mode backlight halo and an OLED-style screen wake bloom
- break dimension lines around their labels instead of masking with paper fill
- pause the render loop while the sheet is off screen

This branch was successfully deployed

4 active deployments
Preview – weshipit-today — 33bbd313 Deployed Sep 19, 2026 by vercel[bot]
Preview – banner-preview — 33bbd313 Deployed Sep 19, 2026 by vercel[bot]
Preview – design-weshipit-today — 33bbd313 Deployed Sep 19, 2026 by vercel[bot]
Preview – next-davidl-fr — 33bbd313 Deployed Sep 19, 2026 by vercel[bot]
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