Re: [csswg-drafts] [css-overflow] scrollbar-gutter should not do anything for non-scrollable boxes (#6028)

> @felipeerias I find it a bit hard to believe that doesn't affect painting order in other unexpected ways, but I don't have the time to check right now.

In Blink/WebKit, it is true that allocating a PaintLayer (RenderLayer in WebKit) affects paint order. But that's just an implementation mistake (a big one, as it turns out! In Blink we've been working on fixing it for years now.) that should be fixed. In any case, the commit Felipe mentioned above avoids this problem in the case of `scrollbar-gutter`, and any other effect is also a bug. If an element has `overflow:clip` and `scrollbar-gutter`, then paint order should not be affected. Implementations can avoid creating any of these side-effect-causing data structures by just treating `scrollbar-gutter` as another form of margin.

Also, to re-iterate the use cases already mentioned above:

1.  Align content outside of a scrolling box (header, toolbar...) with content inside of it.
2. Retain stable layout when switching from a non-scrollable to a scrollable style.

I don't know how common (2) is, but I think (1) is common.


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


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

Received on Tuesday, 20 April 2021 00:23:26 UTC