-
Notifications
You must be signed in to change notification settings - Fork 687
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] Add a way for timeline-scope to pull up all contained timelines #9158
Comments
This will make the lives of library authors and authoring tools so much simpler! In such cases you would probably always start from Which makes me wonder, perhaps this should be in the UA's stylesheet on the root? |
That could lead to unwanted side-effects in case a name is (accidentally) reused across different components on the page. |
I was thinking about it: I wonder if, alongside Use case: we could want to set up a catch-all scope for all the dynamic scopes we could set up, but then we would know that we would have some elements that want to pass their scope through, so we would want to not scope some list of other known scopes. I'm not sure what the potential proposed syntax could be. Something like |
Looks like something more of an issue for additive cascade to solve. |
Hmm, I'm not sure if I see how this could help here? What I'm talking about is cases like this: <div class="a" timeline-scope: --d>
<div class="b" style="timeline-scope: all except(--d)">
<div class="c" style="timeline-view: --c1"></div>
<div class="c" style="timeline-view: --c2"></div>
…
<div class="d" style="timeline-view: --d"></div>
</div>
<div class="e"></div>
</div> Where we could want to have With just I don't think this is possible with additive cascade, as it would require us to have actual rules targeting the |
Syntax of how exactly to remove some value, you’d have two <div class="b" style="timeline-scope: all; timeline-scope:- --d;"> However, now that I’ve written the above: that would still require some way of actually computing that to “all except --d”. Hmm. 🤔 My suggestion here would be to split off this requested |
I'm ok with splitting it — it is for sure something that can be added later, and Given we'd have a bunch of other places that could potentially have scoping with the |
The CSS Working Group just discussed The full IRC log of that discussion |
The CSS Working Group just discussed
The full IRC log of that discussion<YehonatanDaniv> bramus: this issue is about declaring many animation timelines and using broader scope<YehonatanDaniv> ... this issue is about using "all" for hoisting them up <flackr> q+ <YehonatanDaniv> ... allow also anchor name for hoisting up using anchor scope <Rossen_> ack flackr <YehonatanDaniv> flackr: can a timeline be pooled up with multiple scope <YehonatanDaniv> fantasai: no <fantasai> s/pooled/pulled/ <bramus> s/pooled/pulled/ <fantasai> scribenick: fantasai <fantasai> fantasai: the 'all' keyword traps all the keywords, just like individual keywords trap those keywords <fantasai> ... might be useful if you want to encapsulate <fantasai> flackr: ok <fantasai> Rossen_: any other concerns? <fantasai> bramus: proposed to add "all" which will pull up all timelines <fantasai> (It's basically the same as specifying all possible names) <schenney> The concern raised by flackr is already in the issue, raised by https://github.com//issues/9158#issuecomment-1742797028 <fantasai> YehonatanDaniv: if I name something in a descendant, and then specify all in an ancestor, what happens? <fantasai> flackr: the lower scope captures that name, it won't be pulled higher up <fantasai> RESOLVED: Add 'all' keyword to 'timeline-scope', equivalent to specifying all possible names |
(Branching off from #8915 here, where @flackr suggested
timeline-scope: all
on the call)This proposal is to add a way for
timeline-scope
to pull up all contained timelines using a single property value.Use-case is when you have a set of elements that need to sync to another set (with the same size) of elements. Think of navigation indicators, typically implemented using a “scrollspy”. Authors can nowadays do this using Scroll-Driven Animations (see this demo by @kizu).
To pull up the visibility of the contained timelines up to a shared parent, authors need to set the
timeline-scope
property’s value to include those names. This can be quite repetitive and is brittle to maintain.An easier way out, would be to allow a keyword such as
all
as the value fortimeline-scope
. That way, all timelines in view of that element would be pulled up.This addition would simplify all this for authors.
(The rest of the code – the first snippet posted – can be simplified using the proposal in #9141)
The text was updated successfully, but these errors were encountered: