On Sat, Dec 14, 2013 at 10:23 AM, Matt Rakow <marakow@microsoft.com> wrote: > I've been spending some time thinking about this as well. There are a > couple additional element-snapping scenarios I'd like to make sure are also > addressed, in particular: > 1) Snapping an element to the center of a scroller (instead of the edge) > 2) Snapping an element to some offset from the edge (e.g. next/previous > item "peeks" to show the user there is more content) > > I've got some thoughts on how we might generalize this proposal a bit more > to make these scenarios a bit easier to solve, and am working on a writeup > for consideration. > Good ideas. Off the top of my head, #2 can be solved by adding syntax for CSS margin-like lengths to scroll-snap-edges, e.g. scroll-snap-edges:border-box 0 50px. #1 can be solved by adding a 'center' keyword and adding candidate scroll positions that center the element in the container. The directionally-dependent snapping behavior sounds interesting, though > I'll need some time to wrap my head around what the behavior would be like > in some of the applications we've seen. Do you have any particular > scenarios where you're applying this behavior that help illustrate its > benefits? > Almost any scenario where you have a list of items and the scrolling container height is not a multiple of the item height (including cases where the item height is variable). For example, scrolling through a list of images in the viewport of a classic desktop browser, where the window can be any size at all, using up/down arrow keys for example. Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o wReceived on Friday, 13 December 2013 22:02:11 UTC
This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:37 UTC