Repository navigation
Motion: one global reduced-motion rule for the v1 animations - #334
Merged
Merged
Conversation
Under prefers-reduced-motion: reduce, every animation jumps to its end frame and every transition is instant. Entrance animations that start at opacity 0 still show their content. The rule is !important in the base layer so it wins over the atomic utilities. Refs #316
The carousel loops through framer-motion, which the CSS rule cannot reach. Under reduced motion the logos stand at their start position. Refs #316
Review findings on the global rule. A zero transition delay made the page dim to 25% on every client navigation, so delays stay: they move nothing. An element that sets its own reduced motion behaviour opts out with data-motion-own; the navbar panel uses it to keep its fade. Refs #316
Without the float-cursor loop, the SVG transform attributes applied and the arrow was clipped at the bottom of the illustration. Refs #316
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Closes #316
What
preset/global-css.ts: one global rule underprefers-reduced-motion: reduce. Animations last 0ms with no delay and run once; transitions are instant. Entrance animations (allforwardsfill) show their end frame at once, so content that starts atopacity: 0still shows. Loops rest on the element's own style. Transition delays are kept: a delay moves nothing, and the page dimming on navigation (app/routes/_main.tsx) relies on one to skip fast loads.!importantin@layer base, which beats the atomic utilities, recipes and inlinestyledelays.data-motion-own(the element only, not its children). The navbar panel uses it to keep its opacity fade.ClientCarousel(customer stories): framer-motion loop, out of reach of CSS. It now readsusePrefersReducedMotionand stands still.transformattributes applied and the arrow was clipped.slideandscaleProgresskeyframes deleted (unused).Components that already handled reduced motion (
Reveal,useInView,Tabs, Revenue AI thesis, stack diagram, bow tie, home hero timeline) resolve toanimation: noneor aninstantduration already, so they behave the same.Reduced motion off: no change
Generated
styles.cssdiffed againstmain: the only differences are the new media block and the two deleted keyframes.Verification
pnpm check,pnpm typecheck,pnpm test:run(88 files, 1248 tests) green.(prefers-reduced-motion: reduce)media rule switched toallin the page (the browser pane cannot emulate the media feature). Infinite CSS animations before, running animations after:revenue-ai0 to 0.mainleft atopacity: 0on any of these pages./clients(the hidden browser pane frozerequestAnimationFrame). Checked by code review: hook order, SSR, live toggle. To check on the preview with OS reduced motion on.Pages to review on the Vercel preview (ADR 0002)
This PR changes
preset/. With reduced motion off nothing changes. With reduced motion on, these non-redesigned pages can change: offer (grid float, entrance pops, hero bounce), customer stories (logo carousel, radar illustration), about us (illustration), technology, method (v1 parts), blog, legal and contact (hover transitions become instant). The J1 route checklist has a new line for it.Known limits, deferred to J5
overflow: hidden, so logos past the viewport are not visible (home/client-marquee.tsx,ClientCarousel.tsx).studio/studio-marquee.tsxshows the wrap pattern to reuse.slow-faderect rests at opacity 1 instead of its 0.1 to 0.85 range.