Re: [csswg-drafts] [scroll-animations-1] Consider initial value of auto for view-timeline-inset (#7747)

> > However, looking into this, it seems that the overlap in page-down is not part of [scroll-padding](https://w3c.github.io/csswg-drafts/css-scroll-snap-1/#scroll-padding) but in addition to it, as can be seen on this [demo](https://output.jsbin.com/gewojan) with scroll-padding: 0px where page down scrolls 87.5% of the optimal viewing region defined by the 0px scroll-padding.
> 
> That's a spec violation against css-scroll-snap, then.

That's not clear to me. I'd suggest an update to the language if this should be the case. Right now it says [to adjust the scroll container’s optimal viewing region for the purpose of paging and scroll-into-view operations](https://w3c.github.io/csswg-drafts/css-scroll-snap-1/#ref-for-optimal-viewing-region:~:text=scroll%20containers%2C-,to%20adjust%20the%20scroll%20container%E2%80%99s%20optimal%20viewing%20region%20for%20the%20purpose%20of%20paging%20and%20scroll%2Dinto%2Dview%20operations,-.%20Similarly%20the%20scroll), but it's not clear that page down is expected to be exactly the defined optimal viewing region. The browser interprets it as the visible content area and additionally intentionally tries to ensure overlap so that you can follow where you came from.

Though I think making this change will be breaking since sites today are used to setting scroll-padding to the region which is obscured but don't expect page down to scroll exactly the visible region. Similarly, including the 12.5% default padding in `scroll-padding: auto` would mean that scrollIntoView operations must scroll elements further into view when linked to / typed in / scrolled into view via JS.

> Zero should mean zero, otherwise the author doesn't have the ability to control it.

So you can control the distance (at least in Chrome - looks like Firefox and Safari do not modify the scroll distance of page down. I will add a test for this) - but the page down scroll distance scrolls 87.5% of the developer defined optimal viewing area on a page down keypress. Here's an example where the optimal viewing area is 50vh ([root scroller](https://output.jsbin.com/medubip/quiet), [overflow scroller](https://output.jsbin.com/yepaxom)) which in Chrome scrolls 87.5% of 50vh with the same goal of ensuring some overlap between the previous and next page.

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


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

Received on Monday, 31 October 2022 17:29:00 UTC