Attempting to create a modal similar to the one on Reddit, I am puzzled about how they achieve the following:
Scroll is disabled when the modal is open
Scroll is enabled when the window is smaller than the modal
I have experimented with various CSS properties in Chrome dev tools, but none of them seem to affect scroll behavior. I also tried implementing a scroll disabling function, however, it ended up disabling all scrolling, even when the window is smaller than the modal.