Re: [csswg-drafts] [css-overflow-4] effect of gutters on viewport units (#5254)

> > it would seem much preferable for the viewport percentage units to be relative to the ICB as reduced by the always-present gutter
> 
> It would definitely be preferable, but I suspect it wouldn’t be good enough. In a browser with classic scrollbars, if the page does not scroll, an element with a width of `100vw` would not go all the way to the right edge of the viewport. There would be that gap of 15 to 17 pixels for the gutter. If developers don’t like this gap, they won’t use 100vw, and instead they’ll use whatever solution or hack that gives them the actual viewport width at all times.

In that case maybe authors should not use a stable gutter to begin with? The idea behind a stable gutter is to prevent layout shifts. If `100vw` would change size depending on the scrollbar being there or not, that would defeat the purpose of the gutter.

You could, however, say something for `position: fixed` elements, as you would typically want those to actually **do** cover that gap. Think of a backdrop that covers the whole page. The effect of the gutter on the Layout Viewport is being discussed in https://github.com/w3c/csswg-drafts/issues/8099






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


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

Received on Wednesday, 6 September 2023 21:32:26 UTC