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

> I think you are, then, just describing the "search for an ancestor establishing a root of the same name, and if that fails, create a root on yourself" behavior, yeah?

Without `-root` specified, it wouldn't create a root on itself as it wouldn't allow additional descendant attachments. This makes it so that descendants with the same name can't invalidate the timeline in that scope. To go back to my earlier example you could have this:

```html
<style>
unhappy-root {
  view-timeline-root: foo;
}
happy-subtree {
  view-timeline: foo block; 
}
.observer {
  animation: frames;
  animation-timeline: foo;
}
</style>
<unhappy-root id="A"> <!-- attached to by B and C -->
  <happy-subtree id="B"> <!-- establishes itself as foo timeline for descendants AND attaches to foo timeline on A -->
    <div class="observer"></div> <!-- animates to timeline on "B" -->
    <happy-subtree id="C"> <!-- establishes itself as foo timeline for descendants AND attaches to foo timeline on A -->
      <div class="observer"></div> <!-- animates to timeline on "C" -->
    </div>
  </happy-subtree>
  <div class="observer"></div> <!-- unhappy - has two timelines associated with the A timeline -->
</unhappy-root>
```

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


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

Received on Friday, 28 April 2023 13:57:45 UTC