Repository navigation
Motion: a theme times its changes, and overlays come and go - #25
Merged
Merged
Conversation
A theme carries a Motion: how long a small change, an appearance and a going take, and the curves they follow (a cubic-bezier, or a spring drawn as linear()). Unit's is quick and settles; Soft's is longer, on a spring that passes its mark and comes back; Sharp's is short and straight. - Small changes in place ease between their looks: a hover, a press, a chip or a tab chosen, a checkbox filling. A switch's knob slides across rather than jumping. A menu's row still lights at once. - Menus, dialogs, action sheets, modals and toasts grow or rise into place, a scrim fades in. A closed menu and a dismissed toast are drawn going, where no pointer reaches them and nothing reads them, and then taken away: by the host's sleep, or a browser's own timer. - MotionSetting on the root (System, Full, Reduced) keeps a page still where the system's prefers-reduced-motion or the host asks; a terminal's cells never move. Blitz runs the transitions and keyframes on its own clock. Its Stylo draws the frames between only for keyframes that name both their ends, so every keyframe does. The gallery offers Motion beside the others (?motion= on the web, UNIT_MOTION in a window); its test pages are still, as a test's clock stands at 0, and two Blitz tests step the clock through a menu's coming and going and a toast's.
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.
What
A theme says how it moves.
Themegains aMotion: durations for a small change, an appearance and a going, and their curves. Easing is acubic-bezier(), or a spring drawn withlinear().What moves:
Staying still:
MotionSettingon the root (System,Full,Reduced) keeps a page still where the system'sprefers-reduced-motionor the host asks. A host on Blitz, where no media query reports the system's setting, passes it explicitly. A terminal's cells never move.Blitz
Blitz runs CSS transitions and keyframes on its own clock. One finding: its Stylo only draws the in-between frames of a keyframe animation that names both its ends; a
from-only keyframe jumps at the end. So every keyframe here names both, and thestyle.rsheader says so.Tests
GallerySized,GalleryAt) are still by default, because a test's clock stands at 0: anything that moved would stay at its first frame.cargo fmt --check, clippy (native and wasm32 web),cargo test --workspacewith the audit for all three themes, the Blitz tests in dark, andcargo docwith warnings denied.Gallery
A Motion control sits beside Theme, Appearance and Density.
?motion=full|reducedsets it on the web, andUNIT_MOTIONin a window.For Diaryx, later
MotionSettingfrom the system's Reduce Motion on iOS and macOS.Unit::set_timer); without one they go at once, as before.Generated by Claude Code