Re: [csswg-drafts] [css-scroll-snap-2] scroll-start-target: auto doesn't match general meaning of auto (#11173)

Thanks @argyleink & @flackr, I like these suggestions.

> In particular, scrolling to a fragment:
> 
> * Scrolls all ancestor scrollers as well, e.g. `scroll-start-target: none | local | global`?
> * Only scrolls if discovered during the navigation, but not if you later add the node to the document, e.g. `scroll-start-target: none | navigation | always`

I think it would be nice to keep these options open so I wonder if we could simply replace `auto` with `local` in the current implementation, allowing us to later include `global` as an alternative option in the future. This wouldn't break any pages using `local` as `local` would still match the "[nearest scrolling ancestor](https://drafts.csswg.org/css-scroll-snap-2/#scroll-start-target#:~:text=nearest%20scroll%20container)" interpretation in the current implementation.

We would also be able to, in the future, expand the syntax to address both questions, i.e. have `scroll-start-target` take one or two values:

`scroll-start-target: [<scope>] [<timing>]`

where `<scope>` could be `none | local | global` and <timing> could be `navigation | always`.

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


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

Received on Tuesday, 12 November 2024 17:55:04 UTC