I have a snap-y snap-mandatory overflow-y-scroll
container with several items inside. The snap is working, but I don't like how the snap is animated.
Is there any way to control the animation of the snap?
I had hoped that transitions might offer some control over this, but (unless I'm misunderstanding something) it seems that transitions are really meant for items entering or leaving the DOM.
I'm using Svelte and TailwindCSS; so, if either of these libraries provide an easy way of doing this, please let me know. If it's only possible to achieve this by writing something from scratch, I'll probably just leave it be.
As you noted, Svelte's transitions deal with elements being added/removed.
The scroll snap animations are controlled by the browser and there does not seem to be a way to affect the animation itself. There is the scroll-behavior
property but that does not have many options and none that would affect scroll snapping.