Re: [css-snappoints] What if snapped element is much taller/wider than viewport?

On Wed, Dec 2, 2015 at 5:21 PM, Belov, Charles <Charles.Belov@sfmta.com> wrote:
> Tab Atkins Jr. wrote on Wednesday, December 02, 2015 10:07 AM
>>On Tue, Nov 24, 2015 at 4:22 PM, Belov, Charles <Charles.Belov@sfmta.com> wrote:
>>It might also be helpful to expand that to include the expected behavior for keyboard navigation.
>>
>>> Perhaps something like:
>>[snip stuff about "don't return to the previous snap point if using arrow keys]
>
>>That's also already in the draft. ^_^
>><https://drafts.csswg.org/css-scroll-snap/#choosing>, 5th bullet point, starting with "User agents must ensure that a user can "escape"
>>a snap position, regardless of the scroll method.".
>
> Thank you, Tab. I would suggest removing
> "Instead, a smarter algorithm that only returned to the starting snap position if the end-point was a fairly small distance from it, and otherwise ignored the starting snap position, would give better behavior."
> as contrary to
> "User agents must ensure that a user can "escape" a snap position, regardless of the scroll method."
> for a single press of an up-arrow or down-arrow key.

Those are intended to be slightly contradicatory; there are multiple
conflicting desires in a good snapping implementation, which a UA has
to balance.

That said, if a keypress doesn't guarantee an escape, then it violates
the MUST-level requirement.  Keypresses are non-inertial, so if a
single keypress can't escape, multiple keypresses can't either.

> I sometimes press the up- or down-arrow only once or twice to reveal text that has been skipped by a Scroll Down or Scroll Up on a page that has part of the page covered by a stationary top or bottom navigation div.
>
> If I'm trying to only escape by a line or two, I don't want the browser second-guessing me that I didn't really mean to escape.

Ideally, future pages will use Flexbox or Grid so their top/bottom
navs actually take up space, rather than overlaying the content. ^_^

~TJ

Received on Thursday, 3 December 2015 01:29:31 UTC