Re: [csswg-drafts] [css-ui][selectors][mediaqueries] Expose current scrolling direction (#6400)

+1 to @flackr. That's usually the case, so probably solving velocity will solve more cases.
If we want to persist the velocity past the `scrollend` point then we should probably solve transitioned progress of animations, and that might be something we can build on top of.
Here is an example of both using @bramus' custom properties trick (SDA required): https://jsbin.com/calicaxuhe/edit?css,output

Furthermore, if we solve velocity/delayed we should probably do so for pointer-driven animations as well.

Though there are use-cases where direction is used without depending on velocity. These are usually show/hide of fixedpos UI, usually on mobile. For example: show/hide scroll-to-top button or header when scrolling back up, kinda like the addressbar does it.



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


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

Received on Friday, 16 May 2025 09:58:00 UTC