Re: [csswg-drafts] [css-overscroll-behavior] Inhibiting "scroll chaining" from non user scrollable elements? (#3349)

@chengyin I am suggesting more options, yes, a *more configurable form than is currently offered.

Regarding...

> I think there are ample cases of responsive UIs where an authors desire would be to contain ONLY IF the scroll container has overflow, not always contain because it happens to always be a scroll container.

```html
<aside>...</aside>
<main></main>
```
```css
body {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}
main { flex: 1 1 auto; }
aside {
  position: sticky;
  top: 0;
  width: 15rem;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
```
This might too simplified, but I've seen many UIs like this where if the content of the sidebar does not happen to create overflow the author would like scrolling above the sidebar to scroll the body/main. BUT if the content of the sidebar does create overflow, then the author'd rather not have chaining from the scroll boundaries of this user scrollable sidebar. I see native touch interfaces exhibit this logic often as well.

So I guess my initial proposal of a `never` value for `overscroll-behavior` on all scroll containers, with maybe `contain`/`none` values only affecting scroll containers that have "user scrollable" overflow, would provide more options for authors is all.


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

Received on Wednesday, 15 May 2019 22:40:34 UTC