You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scrollIntoView API has the block and inline settings which tell it where in the scrolling viewport the target element should be scrolled, 'start', 'center' etc. And has behavior smooth. But that is not enough for real world use cases.
You may want "space" round the target element rather than when scrolling to block : 'start' having the top touch the top of the viewport.
If the target is extremely large, you may need to ask for just the top 200 pixels of it to move into view.
And finally... Of course it should yield a Promise which resolves when the smooth scrolling has settled and the layout is in its final shape.
title: A comprehensive scrolling API
date: 2025-03-21T05:45:54.403Z
submitter: ExtAnimal
number: 67dcfd12c70e2900a37d771d
tags: [ ]
discussion: https://github.com/WebWeWant/webwewant.fyi/discussions/
status: [ discussing || in-progress || complete ]
related:
url:
type: [ article || explainer || draft || spec || note || discussion ]
The scrollIntoView API has the block and inline settings which tell it where in the scrolling viewport the target element should be scrolled, 'start', 'center' etc. And has behavior smooth. But that is not enough for real world use cases.
You may want "space" round the target element rather than when scrolling to block : 'start' having the top touch the top of the viewport.
If the target is extremely large, you may need to ask for just the top 200 pixels of it to move into view.
And finally... Of course it should yield a Promise which resolves when the smooth scrolling has settled and the layout is in its final shape.
I have an issue outstanding: w3c/csswg-drafts#9836
Also, it does not handle sticky elements which occlude the target part of the viewport.
w3c/csswg-drafts#3104
If posted, this will appear at https://webwewant.fyi/wants/67dcfd12c70e2900a37d771d/
The text was updated successfully, but these errors were encountered: