Post ARbKBKsGUL2FNlBluy by corne (DIR) More posts by corne (DIR) Post #ARbIHKCThuZR7ZN64O by pixelambacht@typo.social 0 likes, 2 repeats TIL you can prevent layout shift when changing fromoverflow: hidden;to overflow: auto; /* or scroll */by addingscrollbar-gutter: stable;to the container 🤯No more hacky padding-and-JavaScript shenanigans! Thanks @bramus for sharing!https://www.bram.us/2021/07/23/prevent-unwanted-layout-shifts-caused-by-scrollbars-with-the-scrollbar-gutter-css-property/ (DIR) Post #ARbKBKsGUL2FNlBluy by corne 2 likes, 0 repeats Thanks for sharing the article. I found the property a while ago, but it didn't work on body. It does however work when applied to :root as mentioned in the article.