Re: [css4-ui] Scrollbar tracking control

Reviving this two-year old thread.

I've written up a proposal based on the discussion in this thread on a
property to allow chat rooms and similar things to make the *bottom*
edge of their scrollable area "sticky", so that when you scroll at or
near the bottom and then new messages come in, you automatically
scroll further down to see them.

https://tabatkins.github.io/specs/css-sticky-scrollbars/

Per Matt Rakow's comments at the end of the previous thread, this is
very possibly best integrated in as part of Snap Points, though the
behavior is moderately different - rather than "correcting" where a
scroll/fling gesture ends, this corrects your scroll position when
you're *not* scrolling, but the scrollable area changes sizes.  It
also only triggers when the element is scrolled sufficiently close to
an edge, but *after* the size-change the old scroll position might be
*quite far* from the new edge, so you can't just use the logic of "if
I'm near the edge, snap my scroll position to the edge"; you'll either
miss a bunch of cases, or over-correct a bunch of cases.

I also have an issue talking about the "scroll stability" topic, where
you might want the ability to say "adjust my scroll position to keep
my current view stable" when things above you change size or get
added/removed.  This is a distinct ability from the sticky edges,
though they're thematically related: scroll stability is about keeping
your view stable, while sticky edges is about purposely *changing*
what you're looking at to keep you conceptually at the "end" of the
content!

Thoughts?

~TJ

Received on Tuesday, 12 August 2014 21:33:16 UTC