-
Notifications
You must be signed in to change notification settings - Fork 641
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
[scroll-animations-1] Timeline lookup should probably not use flat tree #8192
Comments
While I 100% agree for container queries, I'm less convinced for this case. We're looking at the nearest scroll container because that's what determines whether you're visible! I can easily imagine some kind of web-component that implements fancier scrolling behavior of some kind, that we wouldn't want to exclude here. Right? |
I tend to agree with @fantasai on both perspectives. If we do restrict it we lose the ability described above. The only case I can think of is perhaps if author expected to get an
IMO it should come down to whether we want to allow the author a way of scoping this case. |
Fine to spec it as flat-tree ancestors, but currently the spec just says "nearest ancestor", which is ambiguous. |
The CSS Working Group just discussed
The full IRC log of that discussion<fantasai> TabAtkins: My position on container queries doesn't apply here, I agree with fantasai<fantasai> s/Topic/Subtopic/ <TabAtkins> ydaniv: AGreed, but one concern <TabAtkins> ydaniv: "nearest" is taking your lookup - you might think youw ere inactive but end up in an active timeline <TabAtkins> flackr: I think that's consistent with other scroller APIs, like stickypos <TabAtkins> fantasai: So proposing to resolve we do use the flat tree to find nearest scroller <TabAtkins> flackr: yup <TabAtkins> astearns: so where the spec currently says "nearest ancestor" we make it explicit to be flat tree <TabAtkins> RESOLVED: SLA does do flat-tree lookup for nearest ancestor scroller, spec will be clarified |
@andruud I shifted the note about using the flat tree from https://drafts.csswg.org/scroll-animations-1/#timeline-scope and generalized it into https://drafts.csswg.org/scroll-animations-1/#other-specs as
Let me know if this works for you, or if you would like some other clarifications. |
@fantasai Works for me, thank you. :-) |
It was strongly argued (by @tabatkins) that container queries should not look up the flat tree, to avoid the presence of a container inside the shadow to become an implicit part of the API contract. I don't see why scroll containers should be any different.
Should probably follow container queries and specify that we search shadow-including ancestors (inclusive).
The text was updated successfully, but these errors were encountered: