I need some guidance on what I might be doing wrong and if my approach is efficient
I have recently asked a question regarding snapping sections on scroll
The response from @akapowl was really helpful because it opened my understanding a bit and directed me to some light as I was lacking understanding
of the ScrollTrigger plugin.
I now have implemented what I wanted to achieve by following this pen (
See the Pen rNLOdbB by GreenSock (@GreenSock
Apparently some browsers size things oddly, like in this case if you console.log() the innerHeight of the window and compare that to the offsetHeight of the panels, you'll see that even though the panels are set to 100vh, the browser may render them 1px taller! Since the code bases everything off of window.innerWidth including the scrollTo value, it ends up being inaccurate (1px drift for each panel, compounding as you go up). That's not a GSAP issue - it's a combination of a browser issue and l