Here's my main sandbox - https://codesandbox.io/s/sharp-feather-ijr4np
To start, yes, I am on a bit of a King of the Hill kick.
The image in the middle (with text) should be pinning as it crosses the scroller-start, and it does. However, it sometimes jumps around almost glitchy, as if it's not setting the position until the next repaint. This, of course, is much more noticeable on wheeling as that can happen faster than key-scroll. This sample is boiled down from my project and uses NextJS, Typescript, and Theme-UI for almost all the components. And no CSS, really - all styles are baked in via these `sx` objects.
I've tried anticipatePin 1-10 with no success
setting the styling for * { margin: 0 !important; padding: 0 important!} which will affect every element, just not solve the issue
reparent and no reparent
changing the scroller from the body to other elements
This is my first time using Next, Typescript, Theme, or the ScrollTrigger plugin, so there's a lot I could be missing.
I've created an alt version of the project here https://codesandbox.io/s/react-and-scss-forked-s1zt8i, using just React and SCSS - it works perfectly smooth, doesn't require reparenting, etc so I'm fairly confident there's something about Next / Theme / Typescript / the styling pattern used in this project affecting how things work and are rendered, but I can't suss it out.
I've also attached a video where you should be able to see the jump a lot more clearly in the actual app
Any insight would be appreciated, and thank you for taking the time to look!
Screen Recording 2022-04-08 at 5.31.33 PM.mp4