So I have been trying to make sections stick to the top of the screen while scrolling.
I have used scroll-snap-type: y mandatory; for the html and body elements and scroll-snap-align: start; for the children (sections) elements.
This works as expected on Chrome (both Windows 10 and MacOS Big Sur) and Edge, but does not work correctly on Safari. On Safari the scroll goes a couple of hundred pixels too far, cropping the top of the desired sections and making the beginning of the next sections visible. The gap seems to grow bigger each section. I have already tried:
scroll-padding-top: 0;
scroll-padding-bottom: 0;
on parents, and
scroll-snap-margin-top:0;
scroll-snap-margin-bottom:0;
on children.
None of the margin/padding values seem to improve the results (some of them go as far as making the gap bigger or breaking the scroll completely).
scroll-snap-type: y proximity; works as expected, but it is not the effect I am after.