Re: [csswg-drafts] [scroll-animations-1] blocking effects of timeline-scope (#8915)

The CSS Working Group just discussed `[scroll-animations-1] blocking effects of timeline-scope`, and agreed to the following:

* `RESOLVED: A timeline-scope also prevents the timeline from being scoped even higher.`
* `RESOLVED: contain:style prevents timeline names from leaking out past it`
* `RESOLVED: Don't add any additional keywords to timeline-scope for this use-case (for now)`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> fantasai: I just wanted to confirm with the WG the behavior<br>
&lt;TabAtkins> fantasai: The timelie-scope property is defined to pull the scope of a timeline name up to an ancestor, which makes it available to a larger subtree<br>
&lt;TabAtkins> fantasai: as we were drafting, robert clarified that it also blocks the timeline from being pulled further up into a higher ancestor<br>
&lt;TabAtkins> fantasai: so i'm just confirming that it desired behavior<br>
&lt;TabAtkins> fantasai: and second to ask if we want to add keywords to make this blockign behavior work for all timeline names on an element<br>
&lt;TabAtkins> flackr: the motivation is that if you define a timeline scope for an element, you're isolating the effects of the timeline named there from affecting anything outside that element<br>
&lt;TabAtkins> flackr: so it's similar to containment in a way<br>
&lt;TabAtkins> fantasai: so any thoughts or comments about this blockign behavior?<br>
&lt;TabAtkins> fantasai: if it seems good we can resolve on that<br>
&lt;TabAtkins> (don't really have an opinion, seems fine)<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: A timeline-scope also prevents the timeline from being scoped even higher.<br>
&lt;TabAtkins> fantasai: do we want to add keywords that add this scope-blocking on all possible names in a subtree, or all names declared by the element with timeline-scope?<br>
&lt;TabAtkins> fantasai: So if you're doing a bunch on a subtree, you want none of the timleine names to escape the subtree, you don't want to list them all out<br>
&lt;TabAtkins> fantasai: or if you're declaring several that you want to be scoped but you don't wnat to block your children from lifting their scopes, maybe a local thing<br>
&lt;TabAtkins> astearns: apologies, not actually clear what this would do, i assume rob and others have an opinion?<br>
&lt;TabAtkins> fantasai: will explain again. if you declare scroll-timeline on a scroller it's available to its descendants only<br>
&lt;TabAtkins> fantasai: If you want that timeline avaialble higher, you ahve to use timeline-scope on an ancestor referring to it, then it's visible to the scoping element's descendants.<br>
&lt;TabAtkins> fantasai: The blocking effect we jsut talked about means it can't go even higher<br>
&lt;TabAtkins> fantasai: [explains in more detail]<br>
&lt;TabAtkins> fantasai: if you want to encapsulate all the possible scrollers inside you, you might not know all the names on your contents<br>
&lt;flackr> q+<br>
&lt;TabAtkins> fantasai: if you're in a component or whatever<br>
&lt;astearns> ack fremy<br>
&lt;TabAtkins> fantasai: some higher element in your chain might say "timeline-scope: foo" and not be looking for your "foo" timeline, but another one it knows about. but it finds yours instead.<br>
&lt;TabAtkins> fantasai: To prevent this you ahve to preemptively timeline-scope all of your names.<br>
&lt;astearns> ack flackr<br>
&lt;TabAtkins> fantasai: so do we want to make this easier<br>
&lt;TabAtkins> flackr: it feels a bit odd to re-use timeline-scope for this since you're not raising the scope<br>
&lt;TabAtkins> flackr: coudl we say contain:style prevents the leakage or would that be too restrictive?<br>
&lt;TabAtkins> fantasai: think that's a good idea anyway<br>
&lt;TabAtkins> flackr: if we need that, do we need a timeline-scope:all?<br>
&lt;TabAtkins> fantasai: we might bea ble to get away without it, yeah<br>
&lt;TabAtkins> I agree that contain:style should prevent names leaking out<br>
&lt;TabAtkins> that's the point<br>
&lt;TabAtkins> flackr: so that's my proposal, use contain:style<br>
&lt;TabAtkins> fantasai: sounds good<br>
&lt;TabAtkins> astearns: yeah makes sense<br>
&lt;ydaniv> +1<br>
&lt;TabAtkins> astearns: any other opinions?<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;emilio> q+<br>
&lt;TabAtkins> emilio: are there use-cases for scoping timeline names but not counters?<br>
&lt;TabAtkins> astearns: whether or not there is, shoudl contain:style scope both anyway?<br>
&lt;TabAtkins> emilio: it should yeah<br>
&lt;TabAtkins> astearns: so i think we can resolve on contain:style and then your question is about maybe still adding a separate control<br>
&lt;emilio> ack emilio<br>
&lt;TabAtkins> astearns: so any objections to contain:style?<br>
&lt;TabAtkins> RESOLVED: contain:style prevents timeline names from leaking out past it<br>
&lt;TabAtkins> astearns: so emilio's question is an argument for adding a keyword to do just the one thing<br>
&lt;TabAtkins> astearns: i can't immediatly think of a case where you'd want to do them separately<br>
&lt;TabAtkins> fantasai: If we did add the keywords, i just thought of 'contain-all' and 'contain-self'<br>
&lt;flackr> q+<br>
&lt;TabAtkins> astearns: i suggest we leave the keywords out until we have evidence that just using contain:style is insufficient<br>
&lt;astearns> ack flackr<br>
&lt;TabAtkins> flackr: if we did have an "all" on timeline scope, I'd also expect them to raise the scopes they captured<br>
&lt;TabAtkins> fantasai: yeah that's why i thought of the "contain-*" names to separate them a little more from that concept<br>
&lt;TabAtkins> flackr: ah right. but for now I think we're comfortable with not doing this<br>
&lt;TabAtkins> fantasai: so proposed resolution is to not add keywords for ow<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: Don't add any additional keywords to timeline-scope for this use-case (for now)<br>
&lt;fantasai> Side comment: 'contain: style' should probably also affect anchor-name<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8915#issuecomment-1645939339 using your GitHub account


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

Received on Friday, 21 July 2023 16:25:59 UTC