feat: 🎸 adapt phone schematic animation to dark mode - #356
Merged
Merged
Conversation
- 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
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.ps-figure(--ps-grid,--ps-frame,--ps-glow,--ps-screen-ring), with aprefers-color-scheme: darkoverride so the grid drops back instead of reading as a dense mesh on the dark sheet.data-glowradial 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.data-fadewith adata-screenOLED wake animation (brightness overshoot plus a small bloom scale), and add an inset hairline ring at the glass edge.ps-fadeto land onvar(--ps-to, 1)so dimmed parts of the drawing (frame, dimension labels, callouts) keep their intended weight instead of snapping to full ink; per-elementopacityattributes move into--ps-to.prefers-reduced-motionblock to cover the newdata-glowanddata-screenstates, and lower stroke opacity on the drawn chassis/screen/button paths so dark-mode ink stays balanced.dark:text-blue-400toPodcastPhonePreviewon the partenaires hero socurrentColordrives the ink and halo in dark mode.Testing
phone-schematic.spec.tsxto query the screen slot viadiv[data-screen]instead ofdiv[data-fade]; test suite not run.prefers-reduced-motion: reduceend-state check (drawing, halo and screen all settled, no animation): Not run.