Thanks @mvaneijgen for such a quick response.
If I have a set of boxes in main with predefined height, is there a programmatic way of finding out the required height of the view to play out all animations?
For example, if I animated the third box in the same way, that requires adding even more height to the page.
https://codepen.io/vargwin/pen/eYaEvxP
If the page only contained one box of height smaller than page height, I still want the animation in that box to play. Seems like I need to have ("100vh" + box height) as the page height - correct?