Re: [csswg-drafts] [css-scroll-anchoring-1] Unclear whether a 0-size element at edge of region is eligible as anchor node or not (#3483)

> Apparently Chromium's scroll-anchoring implementation rejects 0-sized anchor candidates entirely right now:
> https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/layout/scroll_anchor.cc?l=292-294,299&rcl=e5e637a6e87d92ff6eb47d433ec7f3bb958b74eb

That's what we're doing in Gecko and seems to be reasonable. WPT seems to require it.

One interesting possibility that came up through conversations with some web developers, is using scroll anchoring to implement a 'pin-to-bottom' scroll behavior. This would work by using 'overflow-anchor: none' on all elements within a scrolling box, except for a dummy one that's always at the end. This dummy element then would always be the anchor and insertions into the scrolling box could keep the element pinned to the bottom without an JS.

It's not clear this works yet, still experimenting. But it's possible that it could be preferable to have that dummy element be zero sized and still allow it to be an anchor.

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

Received on Friday, 11 January 2019 15:11:43 UTC