Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-scroll-snap] Clarify what the expected animation behavior on scroll-margin and scroll-padding #8445

Open
hiikezoe opened this issue Feb 12, 2023 · 1 comment
Labels
css-scroll-snap-1 Current Work

Comments

@hiikezoe
Copy link

Those properties are defined as animatable by computed value, but its outcome is unclear to me. Given that these properties don't change layout, browsers don't need to re-snap? I am asking because there's an interesting bug report, https://bugzilla.mozilla.org/show_bug.cgi?id=1816003 .

@fantasai
Copy link
Collaborator

Interesting indeed. :) My expectation is that if scroll-margin is animating while you're snapped to that element, then the scroll position changes in accordance with the animation, so that at any given point in time the layout of the page (and the scroll positions) match what would happen if you loaded the page with those settings. There may be limits to what's practical from an implementation perspective, but in general CSS is stateless and what you get is what the current state of the properties dictate.

@fantasai fantasai added the css-scroll-snap-1 Current Work label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-scroll-snap-1 Current Work
2 participants