My website features a floating box on the side of the page (Parent div) housing a child div with a position:sticky
property that scrolls along with the page as it reaches the top of the viewport. See it in action here: https://codepen.io/Xanthippus480/pen/QWOydJe
I'm interested in having the child div stick to the top of the page while scrolling down, but adhere to the bottom of the page when scrolling up - essentially scrolling upon hitting either end of the viewport instead of just staying fixed at the top. Is this achievable through html/css alone or would it require a script?