- From: David A via GitHub <noreply@w3.org>
- Date: Thu, 30 Apr 2026 18:56:10 +0000
- To: public-css-archive@w3.org
scroll-target-align-001.html and scroll-target-align-002.html made it to [Interop 2026](https://wpt.fyi/results/css/css-scroll-snap?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2026-scroll-snap). > TLDR; There are a few questions around this space: > > 1. If we want to allow the developer to override the alignment, we probably need to have default values of "auto" which can then take the value from the `scroll-snap-align` value if specified, and otherwise fall back to defaults. > 2. If we do want to allow the developer to override the alignment, then we also should update the [scrolling to a fragment](https://html.spec.whatwg.org/#scrolling-to-a-fragment) algorithm to pass in overridable "auto" values. Perhaps we could make `block` and `inline` optional fields of `ScrollIntoViewOptions` with no default values? This way, we can generally tell whether a value was specified or not. The scrollIntoView algorithm already defaults to "start" and "nearest." We would then also have the #scrolling-to-a-fragment algorithm not pass anything. The scrollIntoView algorithm can first look for the specified value, then scroll-snap-align, then default to "start" and/or "nearest." I did a quick search for other examples of optional fields without default values: I found "is" in [ElementCreationOptions](https://dom.spec.whatwg.org/#dictdef-elementcreationoptions), and some other examples. It probably wouldn't stop us from using `auto` in the future. > 3. Can we make the optional "The user agent may also do this" part mandatory? This optional behavior is currently tested by [scroll-target-align-001.html](https://github.com/web-platform-tests/wpt/blob/master/css/css-scroll-snap/scroll-target-align-001.html) and [scroll-target-align-002.html](https://github.com/web-platform-tests/wpt/blob/master/css/css-scroll-snap/scroll-target-align-002.html) which results in [interop 2022 failures](https://wpt.fyi/results/css/css-scroll-snap?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&view=interop&q=label%3Ainterop-2022-scrolling) as it's not implmented in chrome or safari. We could also relax the tests to allow not doing it, but it seems like it would be better if the behavior was consistent. Making it mandatory seems right to me. -- GitHub Notification of comment by DavMila Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9576#issuecomment-4355371613 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 30 April 2026 18:56:11 UTC