← TechnologyThe essentials of

scroll-snap-type: mandatory versus proximity

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 13:48. This is not editorial approval.

In a few sentences

In brief

Mandatory and proximity do not mean uniform behavior.

Useful to know

scroll-snap-type involves the adhesion on a selected axis and determines how strictly it is applied. In mandatory, the container must adhere to a position when scrolling is completed ; proximity leaves more freedom according to proximity. [1]

Example pair is .slides { overflow-x: auto; scroll-snap-type: x proximity; } and .slide { scroll-snap-align: start; }. Only the first rule does not create suitable points in children. At high cards, check to see if the reader reaches all content. Hard-fitting is not appropriate just because it looks nice on a short demonstration text.

Sources

For further detail and to check the information:

  1. [1] MDN — scroll-snap-type ↗