Re: [csswg-drafts] [css-contain-2] Clarify what happens with scrollbars on elements that 'skip their contents' (#5868)

If you use `overflow: scroll; content-visibility: auto; contain-intrinsic-size: auto 0px`, then when the element is visible the content size (without the scrollbars) will be recorded. When the element goes off the screen and skips its contents, the last remembered size will be used as the content size. If the scrollbars disappear, then the outer size will shrink, losing stability.

Of course the contents shouldn't be checked to determine whether `overflow: auto` needs a scrollbar, but I'm not convinced that `overflow: scroll` shouldn't trigger a scrollbar. It can just take space, it doesn't need to be painted.

Maybe it could be explained in terms of `scrollbar-gutter`? Like non-`visible` `content-visibility` forces `scrollbar-gutter: stable` or something.

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


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

Received on Friday, 30 September 2022 23:13:38 UTC