Repository navigation
FSHSP-253 feat(motion): motion tokens in three layers, recipes read by the kit, reduced motion by mode - #49
Merged
Merged
Conversation
…e recipes in the kit
2 of 6 tasks
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.
Jira: FSHSP-253. Port of the Angular starter's FSHSP-252 (4sh/starter-angular#181), same token names and values. Figma variables: FSHSP-254.
Motion becomes a token, like colour:
--transition-*stay the primitives (no rename, nothing deprecated), a newmotioncollection holds recipes by usage that alias them, and the kit reads the recipes. Timing is unchanged outside reduced motion.scripts/tokens.build.mjs): DTCGduration,cubicBezieranddimensionvalues get their CSS form; a unitless duration or a curve whose x leaves [0, 1] fails the build; numbers rounded to 6 significant digits; a mode mapped tonullis not emitted.transition/*typedTIMING/EASINGunder the same names (curves now readcubic-bezier(), same curve); newmotion.jsonwith modesStandard/Reduced.control-transitiontakestogglefor properties that move andhoverfor the rest;motion-transitionreadstoggle; presets,utils.overlay-motionanduseUiMotionclasses readoverlay-in/overlay-out; speed-dial readsstagger. Each recipe falls back to the primitive used before, so--transition-*and--ui-control-transition-*overrides still apply.Reducedemitted under(prefers-reduced-motion: reduce)instead of the0.01ms !importantrules: presets become 80ms fades, movement shortens, colour changes keep their duration.data-motion="off"unchanged.pnpm motion:checkindocs:config:check, with the 3 loop exceptions (skeleton, spinner, progress-bar).AGENTS.md,docs/DECISIONS.md, and indocs/DUAL-ENGINE.mdthe invariant "same motion primitive and recipe names in both stacks".Parity checked against the Angular branch: generated
_tokens-motion.scssand_tokens-transitions.scssare identical,motion:checkpasses.