Re: [csswg-drafts] [css-values] Use of 100vw is causing pointless horizontal scrollbars on some websites (#6026)

Some use cases: most of our sites uses `overflow: scroll` on the root to avoid layout shift between pages (first page does not cause overflow, next page does) or between UI states (toggling a details summary item causes scrollbar to appear).

These sites often have modal UI that hides overflow on root (`scroll-behavior: contain` will not work if modal itself is not large enough to cause scrolling, and only applies if pointer is inside the modal anyways), and extra padding equal to the scrollbar width must be applied to avoid layout shift when showing/hiding the modal (as the scollbar hides and shows respectively).

Dropdown menus with absolutely positioned children (ie: full width dropdown that "breaks out" of it's parent), rely on using the `width: calc(100vw - var(--scrollbar-width))` pattern.

-- 
GitHub Notification of comment by coreyworrell
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6026#issuecomment-1850789042 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 11 December 2023 19:57:46 UTC