Re: [csswg-drafts] [css-overflow-4] scrollbar-gutter is too complex (#4674)

Since there is `auto` and `stable` to make it predictable for non-overlay scrollbars, we still need a third option to reserve space no matter what type of scrollbar it is. Instead of `both`, we can use either the keywords `always` or `force` to say 'No matter what, overlay or non-overlay, reserve that space for me'. It makes it deterministic. To replicate the right image above, use `always|force` and set padding/margin left. I think if we simplify it down to three cases it will reduce the complexity:

Case 1: Do what it does now, only create a gutter if the box is overflowing (auto)
Case 2: Allow the author to reserve space for a classic scrollbar even if the content is not overflowing (stable)
Case 3: Allow the author to reserve space for both classic and overlay scrollbars, no matter what (always or force)

Case 3 is important for alignment between Safari on Mac and Chrome on Windows. Currently, to make something align in a non-scrollable box, you need to detect the UA and set padding accordingly (depending on classic vs overlay).

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


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

Received on Thursday, 29 April 2021 19:43:43 UTC