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:

![issue5252_example_1](https://user-images.githubusercontent.com/1412060/86987105-3bde3c80-c1d0-11ea-9b81-b3e38d3b935a.png)

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

![issue5252_example_2](https://user-images.githubusercontent.com/1412060/86987116-40a2f080-c1d0-11ea-8006-1cdf02ded522.png)

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:

![issue5252_example_3](https://user-images.githubusercontent.com/1412060/86987361-d179cc00-c1d0-11ea-9741-094ab6932e96.png)

(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:

![issue5252_example_4](https://user-images.githubusercontent.com/1412060/86987131-4993c200-c1d0-11ea-820f-1aa76d9d55a2.png)

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 https://github.com/w3c/csswg-drafts/issues/5252#issuecomment-655858902 using your GitHub account

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