5 Matching Annotations
- Aug 2021
-
stackoverflow.com stackoverflow.com
-
Make iframe automatically adjust height according to the contents without using scrollbar? [duplicate] Ask Question
-
-
destroytoday.com destroytoday.com
-
With JavaScript, you can actually calculate the width of the scrollbar and whether it’s visible by comparing two properties—window.innerWidth and document.body.clientWidth. If these are equal, the scrollbar isn’t visible. If these are different, we can subtract the body width from the window width to get the width of the scrollbar:const scrollbarWidth = window.innerWidth - document.body.clientWidthWe’ll want to perform this both on page load and on resize, in case someone resizes the window vertically and changes the overflow. Then, once we have the scrollbar width, we can assign it as a CSS variable:document.body.setProperty("--scrollbarWidth", `${scrollbarWidth}px`)
missing feature: vw/vh can't be used "directly" because doesn't account for scrollbars
-
- Aug 2020
-
codesandbox.io codesandbox.io
-
This illustrates the difference between two types of scrolling:
- scrolling within the dialog
- scrolling the document that includes the dialog
Tags
Annotators
URL
-
-
www.theatlantic.com www.theatlantic.com
-
This kind of anxiety causes us to futurize and catastrophize, both of which take up a lot of emotional real estate. It’s a vicious cycle: The more we worry, the more we try to control our worry with something tangible, such as information. But clinging to our screens for the latest update has the opposite effect because it serves as fodder for more futurizing and catastrophizing. A daily update makes sense. But bingeing on up-to-the-minute news is like stress eating—it’s bloating our minds with unhealthy food that will make us feel sick.
This is something I have noticed as well - it can be very easy to get caught up with up-to-the-second news, and social media makes it very easy to do so.
However, there is so much that we can't do anything about - especially when its a news story about something that is in another city our country.
Finding the right balance of being informed, but not doom-scrolling can be tricky to balance.
-
- Jun 2015