[csswg-drafts] [css-scroll-snap] Snap needed on snap-overflow (#5123)

guidobouman has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-scroll-snap] Snap needed on snap-overflow ==
<!--
* please tag the issue title with the spec's shortname, like `[css-foo]`
  (this is the name from the spec URL, without a level number unless the issue is specific to that level).
  If you're proposing a new feature that doesn't obviously fit in an existing spec, skip this part — don't make something up.

* please be specific (in the title and issue) about what you want to change:
  “make it better” means different things to different people!

* please link to the spec section you're talking about, or at least the spec
-->

When snapping to items that are larger than the viewport, the spec declares that the user must be able to freely scroll while the edges of the item do not yet meet the edges of the scroll container. See https://www.w3.org/TR/css-scroll-snap-1/#snap-overflow for details.

But what happens when you always want to snap to the first edge of the panel, regardless of the direction the user is scrolling in?

To clarify:
- Snap to top when a user scrolls down
- Snap to bottom to user scroll up

In my opinion, this calls for new values on `scroll-snap-align`:
- `nearest-edge`
- `farthest-edge`

---

Demo of the problem:
- https://codepen.io/guidobouman/pen/BxmRJw

Expected behaviour:
- https://panelsnap.com/demos/basic/
- https://panelsnap.com/demos/horizontal/

Disclaimer: I'm the author of PanelSnap

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5123 using your GitHub account

Received on Wednesday, 27 May 2020 15:28:59 UTC