1 hour ago · Tech · hide · 0 comments

I first noticed web scroll areas had scroll locking behavior when making 2D scroll snap demos; I couldn't scroll diagonally without getting hijacked and locked into an x or y axis. Even on a touch device, where a diagonal gesture is so easy and natural. Thanks to Bramus's rad interactive blog post I saw Chrome 153 with the remedy: .scroller { overflow: auto; overscroll-behavior: contain; scroll-axis-lock: none; 👈 } spec | check for support Freedom from the axis lock 🤘🏻 Use cases # I was thinking: swipe to dismiss interactions flings maps or infinite canvas navigating datagrids or tables image zoom scrolling around 360 pano images or 3D model panning data vis exploration Just seems worth while to use the natural inertia, tensions, perf and feels that scroll snap has for the snap feedback of "didnt swipe far enough" and the browser owned easing. Can also mitigate scrollTo strangeness that might do x then y. I did log a bug # I saw some performance regressions in the first 2 demo's I…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.