← Back to release summary

Use scroll-snap-type: pair to snap to a single element

Category
CSS
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

https://github.com/w3c/csswg-drafts/issues/9519 Add a "pair" keyword to scroll-snap-type. If used, when the container scroll snaps to an element on one axis, it should snap to the same element on the other axis. In the existing spec, the "both" keyword allows the scroll container to select snap targets in X and Y axes independently and snap to different targets.

Motivation

See explainer

Standards & signals

Explainers: https://github.com/explainers-by-googlers/scroll-snap-type-pair

View on chromestatus.com