[csswg-drafts] [cssom-view] Option to set a maximum amount of scrolling for behavior:smooth (#8980)

madprops has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view] Option to set a maximum amount of scrolling for behavior:smooth ==
This is about scrollIntoView usage.
In a use-case of mine I wanted to override a `smooth` scrolling behavior to `instant` if the amount to be scrolled was bigger than a certain amount of pixels. This is to avoid visual glitches and unnecessary processing. I ended up doing it myself with javascript: Basically check how much the scrolling would be and if it goes beyond a limit then set behavior to `instant`, otherwise let it be `smooth`. A new argument to scrollIntoView could be introduced to set a number to specify this. I'm not sure if this is already something that happens internally, so this might not be necessary with sane defaults.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8980 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 17 June 2023 01:36:59 UTC