Been scouring the net for solutions to prevent gsap from converting vh units to pixels when animating with scrollTrigger. Ended up using custom css variables which did the trick. It doesn't look elegant but it works.
With this I don't need to worry about the animation "running out of the intended position" whenever the user rotates his/her iPad while browsing the website.
Prevent GSAP from transforming my transforms into matrix()
in GSAP
Posted
Been scouring the net for solutions to prevent gsap from converting vh units to pixels when animating with scrollTrigger. Ended up using custom css variables which did the trick. It doesn't look elegant but it works.
CSS
JS
With this I don't need to worry about the animation "running out of the intended position" whenever the user rotates his/her iPad while browsing the website.