-
Notifications
You must be signed in to change notification settings - Fork 715
[scroll-animations-1] Replace timeline-attachment with timeline-scope #7759 #8906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8a8c496
to
37e0d6e
Compare
scroll-animations-1/Overview.bs
Outdated
or if more than one such timeline exists, | ||
instead declares an [=inactive timeline=] with the specified name. | ||
|
||
Note: This property has no effect if a matching named timeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? Wouldn't that be a nice way to prevent an ancestor timeline-scope
from attaching to a local timeline that needs to stay local?
.ancestor {
timeline-scope: --t;
}
.child {
scroll-timeline: --t;
timeline-scope: --t; /* Forgetaboutit */
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that would require also specifying that if you set timeline-scope on multiple ancestors, the closest one determines the scope. But actually as currently defined, we pull the scope all the way up to the highest scope with that name. I think this is fine? But in any case if we want to change that, we should open an issue to discuss. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this was certainly my intention all along that it only goes to the nearest ancestor with the scope for that name so that you could set a timeline-scope name for a subtree and not have to worry about an ancestor with the same name name resulting in an ambiguous timeline selection. Apologies if this wasn't clear in the issue:
From #7759 (comment)
The downside is that without the double handshake you would still be contaminating the ancestor timeline namespace with a timeline that was only intended to be used in its subtree - which a developer could avoid by making the subtree also an explicit timeline root for the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I updated the definition to say that, see new commit.
It does seem like if this is the direction we want to go, we might also want to add:
- a keyword that blocks all timeline names
- a keyword that only blocks timeline names defined locally on this element
So I'll open a new issue...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #8915
01df526
to
c413c00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. :-)
EDIT: I somehow managed to double-submit.
Alternative to #8902