Re: [csswg-drafts] [css-scroll-snap] scroll-snap-padding vs scroll-padding

To respond to your points...

* This point is, I think, up for debate. I think if we use only 
`scroll-snap-padding`, then it should be renamed to `scroll-padding` 
to make this clearer. If at some point in the future we think snapping
 scroll offsets need different values than non-snapping scroll 
offsets, we can split off sub-properties or have a 
`scroll-snap-padding` property whose initial value copies from 
`scroll-padding`. Wrt whether `scroll-snap-margin` should be renamed 
to `scroll-margin` and given the same effects... I lean towards no, 
because it cannot solve some of the problems we're trying to solve 
here--such as handling carets and pageUp/Dwn, and having a 
snap-specific offset property is (as you point out in other bullets) 
useful.

* Negative padding is a very weird case, and actually points out that 
we probably should be making negative values for `scroll-snap-padding`
 invalid in any case. (Regular `padding` is not allowed to take 
negative values either.)

* I think it's sufficiently clear that `scroll-padding` applied to the
 scroller has an effect on all items within it, and does not care 
about a particular element’s `scroll-snap-align` value.

* If an author wants this effect, s/he can use `scroll-snap-margin` on
 the element representing the pages.

* No, I don't think that the padding describes any alignment. It only 
restricts the geometry of the viewport as it applies to considering an
 item “in view”. That's it. That is the sum total of the proposed 
behavior.

* If the author doesn't use `scroll-padding` then obviously they don't
 get the helpful effects of it. Thats consistent with any other 
property that enhances UA behavior. In cases where there is a desired 
discrepency between snapping alignment and the `scroll-padding` 
values, the `scroll-snap-margin` properties can be used. 
Alternatively, if this is a frequently encountered situation, we can 
have both `scroll-padding` and `scroll-snap-padding` as mentioned 
above.

* Yes, having to reset `scroll-padding` to zero is necessary to turn 
off its effects. However, `scroll-snap-type: none` will still turn off
 all scroll snapping behavior, as expected.

To summarize again, the proposal consists of exactly two points:
* `scroll-snap-padding` is renamed to `scroll-padding`
* `scroll-padding` reduces the area of the viewport that the UA 
considers “visible” when performing semantic (as opposed to geometric)
 scrolling operations.
I think it is fairly straightforward, solves a number of additional 
problems that exist with scrolling, and does not prevent us from 
providing even finer controls in the future should they be necessary.

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

Received on Friday, 19 August 2016 23:17:56 UTC