Re: [css-snappoints][css-scrollsnap] Mandatory snap-points, and voluntarily unreachable content

On Wed, Jan 20, 2016 at 1:54 PM, Francois Remy
<francois.remy.dev@outlook.com> wrote:
> The intent is that the user can see the cross-fade background section when scrolling, but should only snap to the beginning of a page when moving using arrow keys or just when the scroll ends, as the margin are not meant to be readable.
>
> Is that kind of experience possible to achieve under any of the currently-proposed options?

Yes.  I presume that each of the panes will overlap each other (with
negative margins?) and use transparency in their background to achieve
the fade effect?  If so, then you just use scroll-snap-margin with
negative values to shrink the snapping bounds of the element back to
the desired rectangle, and align them however you wish - probably
'center'.  This doesn't actually invoke the "unreachable snap
position" stuff, except maybe accidentally if there are rounding
errors and the first element's snap position ends up technically
slightly outside the scrollable area.  (This kind of possible accident
is one of the reasons snapping to out-of-viewport positions is
desirable.)

~TJ

Received on Thursday, 21 January 2016 02:31:54 UTC