Re: [csswg-drafts] [scroll-animations] Broader scope of scroll timelines (#7759)

Also, as has I think been mentioned I find it a bit odd to add `defer` to `axis` when that is just one of the properties of the declared timeline. E.g. view timelines also have `inset` which will have the same oddity.

It feels like perhaps we're at the point of enumerating the options and bringing it up for discussion as a group to resolve on an outcome.

The options seem to be (please correct me if I've gotten some details wrong):
1. `scroll-timeline-attachment: ancestor | defer | local`. When declaring a name allows the name to be defined as attaching to an ancestor with `defer` or define a name for descendants to map to or declare a local timeline.
2. `scroll-timeline-root: <name>`. Declares a root for a given scroll timeline name. A timeline with a given name in the root's subtree would be accessible for reference from any other element under that root. The root could even declare a different timeline name locally.
3. `scroll-timeline-axis: defer | block | inline`. Makes it clear that the deferred name does not use its axis. However, we have the same oddity with view-timeline-inset which is ignored on the root.

A few common details independent of the above option:
* The attaching timeline determines the axis / insets used, not the root.
* More than one attaching timeline makes the root instance treated as no attachment. While it may be more canonical to have the last instance win, this introduces a fair amount of complexity in tracking updates for little value since this is likely a developer error.
* The instance is the root defining the name, but it defers to the attaching timeline for all details. @andruud I don't think this is strictly required - we could replace the timeline returned to the developer (from `animation.timeline`) with the attached timeline instance, which I think is a simpler mental model for developers.

After thinking through these, I find myself leaning towards the `scroll-timeline-root` / `view-timeline-root` direction though all of the options solve the use cases and I don't think any of them have particularly tricky edge cases. I.e. I've shown that we can make subtrees continue to work even without the double-handshake by having them also define their timeline with their name locally.

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


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

Received on Thursday, 27 April 2023 14:21:49 UTC