Re: [csswg-drafts] [css-overflow-4] defaults for scrollbar-gutter in the block axis (#5252)

As @frivoal says, it makes sense to allow some control over the gutters along the block direction: when an author wants to prevent scrollbars in the inline direction from changing the layout, it seems likely that scrollbars in the block direction shouldn't change it either.

My current understanding is that this block-gutter would occupy the same space that is taken up by the scrollbar, and thus remain visible at all times (as opposed to being drawn as an extension of the padding, in which case it would only be visible after the user has scrolled to the end of the content area).

So, this is the space currently taken up by `overflow: scroll;` scrollbars:


With `scrollbar-gutter: stable;` and classic scrollbars, both are replaced by their gutters when the content is not scrolling:


However, as the content begins to grow and steps on the block-gutter, it is my understanding that it would become necessary (probably, see #5253) to add a scrollbar so that the content can still be viewed. This might be a surprising behaviour for Web authors:


(Note that the author could prevent that behaviour with `overflow-block; hidden;`, but losing the ability to scroll horizontally if needed.)

Compare this with what we would get if the default block-gutter was `auto`, in which case the content would still have some room to grow before triggering a scrollbar:


In light of the above and after some consideration, I am currently leaning more towards `auto` as the default in the block direction, plus defining a way for authors to opt-in to more control (where adding a second value in `scrollbar-gutter` sounds like a good idea).

GitHub Notification of comment by felipeerias
Please view or discuss this issue at using your GitHub account

Received on Thursday, 9 July 2020 02:28:58 UTC