Re: [csswg-drafts] [css-scroll-snap] Multiple nested scrollers and a "default" scrollIntoView()?

> If you want to disable snapping, we already have an API for that - just set scroll-snap-type: none on the container. We don't need to add more ways to do this, I don't think; in particular, I think it's quite weird to have a scrolling operation have the side effect of also permanently disabling snapping for the container.

I should have been more clear. This is only disabling snapping for the scrollIntoView() operation only allowing the author to explicitly ask for their specified alignment to win when it is in conflict with snapping. It should not permanently disable snapping for those reason you pointed out.

> Overall I'm kinda confused tho - you introduce the proposal with the problem that an aligned sIV() won't honor the snap, but the next scroll will; but then your proposed addition just addresses the original problem in my first post, that of what to do about intermediate snap containers during an unaligned sIV().

The general problem that escaping snapping is going to be reverted on next scroll is unavoidable IMHO if we were to allow any form of scroll snapping. The proposed solution at least helps by making it so that the default behavior does not escape snapping. The author has to explicitly ask for it.

Original resolution meant that by default any scrollIntoView() with alignment will trigger the above whether it actually wanted to escape snapping or not.

> (Also, boolean options should default to falsey values, by convention. So if we did do this, we'd want to reverse the naming/meaning of the flag.)

Good to know :smiley:. So perhaps `preventSnap : false` which is similar to `preventScroll: false` that exists in [FocusOptions](https://html.spec.whatwg.org/multipage/interaction.html#focus-management-apis)?

 


-- 
GitHub Notification of comment by majido
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2593#issuecomment-384720481 using your GitHub account

Received on Thursday, 26 April 2018 17:18:50 UTC