metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.52k stars 605 forks source link

Reconsider Passive Scrolling #1243

Closed sideshot closed 1 year ago

sideshot commented 2 years ago

I see the other post about passive scrolling breaking the internet. But it would be good to implement this.

Maybe a good alternative would be to use the scroll-snap function and element most of the need for javascript. Javascript could still be used for sizing and arrows. But leave the rest to the browser. Including lazy-load.

Check out this concept.

Media Scroller

Demo

YouTube

Article

Found here

https://github.com/argyleink/gui-challenges

desandro commented 1 year ago

Yeah! I've thought about using native browser scrolling instead of JavaScript position manipulation with transform(). I've actually built a one-off slider in the past year. So in general, I am for it.

That said, Flickity has a couple features that depend on JavaScript positioning, most critically wrapAround. Given how old Flickity is now, I think I'd rather stick with JavaScript positioning than trying to migrate to a different positioning paradigm.

Not a bad suggestion though. I'll be thinking about this one.