Re: [csswg-drafts] scroll-policy: ease horizontal scrolling by wheel in vertical writing mode (#4380)

> Comparing to scroll-policy, is prioritised-scroll-direction(or such like) a more understandable property name? (A bit lengthy name, but I am not a native speaker).

I think that's better, `prioritized-scroll-direction` makes the function of the property more clear just from reading it. I'd clarify it even more to `primary-scroll-axis`.

> I think scroll-policy can only suggest it, in order to be technically correct, because wheel scroll even doesn't necessarily trigger content scroll according to the spec, the default action of wheel scroll is undefined according to the spec. Even almost all browsers default wheel scroll's action to content scroll, I still think scroll-policy can only suggest how to behave for any browsers that already use wheel scroll as content scroll, nothing is mandatory.

Yes, but we can mandate specifically what happens in the case that the UA's default action is scrolling. That's the case with the `wheelEvent.deltaY` definition, for example. Example spec text:

> The primary-scroll-axis property determines which axis must be scrolled when non-directional scrolling inputs are used (e.g. single-axis mouse wheel). If the default action of a UA an event is to scroll, and the event is non-directional, the UA must apply any scrolling to the primary scroll axis. If the default action of the UA is not scrolling, this property has no effect.

Values might be defined something like this:

> auto: (default) The user agent may determine the primary scroll axis // i.e. existing behavior, browsers just use vertical
> writing-mode: The primary scroll axis is determined from the writing mode, based on the block flow axis.

These are just examples of how I'd write this, not necessarily detailed enough. Also, I suppose you could write `auto` to mean "vertical" but `auto` in CSS typically means "let the UA decide" which usually means "do what we've always done", in this case: "vertical". 

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

Received on Thursday, 10 October 2019 07:19:54 UTC