My webpage serves as a dynamic to-do list, allowing users to add an endless number of tasks of all types. As the list grows in size, the page height increases and a scrollbar appears. Positioned at the bottom right corner of the page is a fixed button that simply takes users back to the top.
What I aim to achieve is to hide the button when the page height does not exceed the viewport height (preventing scrolling) as it would serve no purpose. On the other hand, once the page surpasses 100vh in height, I want the button to become visible by setting its display property to block.