| commit 8ce103a9335ea6dddb6ee39bac84462d2a6998f0 parent edd9d7488f51f1d7d95589c2f1b8356933fd7f22 Author: sqzer <110329244+sqzer-x@users.noreply.github.com> Date: Sat, 1 Aug 2026 01:01:03 +0900 Keep the channel marker moving under prefers-reduced-motion The marker is not decoration — it is what tells you which channel is selected. It was living below the early return that skips the hero sequence, so a reader who asks for reduced motion got no marker at all and fell back to the tinted label. That works, but it means the one piece of state on this control was being dropped for an accessibility preference rather than the animation around it. Positioning now happens before that return and takes one of two paths, chosen once at load: Motion when animation is allowed, plain inline styles when it is not. The two are never mixed on the same element, because Motion composes transforms its own way and interleaving a hand-written `transform` with it leaves the marker out of step. What reduced motion loses is the slide and the squeeze; the marker still lands on the selected tab, immediately. Verified by driving a real click in headless: with reduced motion the marker ends at translateX(130px)/49px, the AUR tab, in both the DOM and a screenshot. The animated path cannot be read the same way — Motion drives these through its own rAF loop, which headless virtual time does not advance, so the computed style stays put and `getAnimations()` is empty. Wrapping `Motion.animate` shows the calls that matter do fire with the right targets: `{width:"49px",x:130}`, then `{scaleX:[0.72,1]}`, then the incoming panel. Diffstat:
|
sqzass~ A static site generator written in Rust |
| git clone https://github.com/debuman/sqzass.git |