-
Notifications
You must be signed in to change notification settings - Fork 710
[scroll-animations-1] What's the point of animation-range? #7901
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
Comments
Note that the But at the same time, any |
Once And anyways, scroll-animations-1 doesn't seem to be changing |
Of course, that's what I meant above. scroll-animations-1 depends on the definition of animation: 1s linear contain fade-in my-view-timeline; Currently Unless, my suggestion above, we can change the definition of
And thus make them mutually exclusive.
I'll do that 👍 |
I don't have a strong opinion on this. We use |
This is an open discussion point, but I put both because reading We could also flip things around and have |
Technically it is still a delay in the units of the timeline. I.e. in the same way that The main issue I can think of with just using |
So to summarize, think there's roughly 3 options to keep these properties cleanly separated: Option 1: (hinted at by my previous comment)
Option 2.a: (proposed above by @fantasai)
Option 2.b:
In order I think I prefer 1, 2a, 2b, however there are good reasons for each. |
It might be too late at night for me to be thinking straight, but another proposal could be Option 3:
|
Agreed, this is a reasonable third option, and I like that it handles the combination of range and delay in a way that makes sense (in the cases where range and delay make sense).
IMO the existence of both duration and end are similar to the existence of both |
The proposal in this comment: #7575 (comment) is also relevant |
The CSS Working Group just discussed
The full IRC log of that discussion<Rossen_> https://github.com//issues/7901#issuecomment-1325538928<dael> fantasai: When we were trying to figure out how to attach an animation to different ranges, named ranges in the timeline. Entry phase, exit phase, and the like and want to attach to some <dael> fantasai: We allowed keyframes to take a named range as well a % to reprsent progress intot he range to be able to built animation that crosses ranges. <dael> fantasai: Also wanted to take existing keyframes and attach to a range <dael> fantasai: Did that with animation delay as a way of indicating where we wanted to attach it. Could give a named range and % into the range as delay <dael> fantasai: That has weird ergonomix for author. Want to attach to entry phase and set animation delay to entry. Reason why we have animation range property is to make it feel less odd <dael> fantasai: Becomes a question if we think about interaction what makes the most sense. flackr comment has several ways to make them intersect or have different responsibilities <dael> flackr: I can present 1 & 2. Option 1 is keeping things close to today. Animation delay only spec start delay. Prop is turnt hat into a shorthand for start and end delay. preserve single value for compat <dael> flackr: It was accept timeline range in each. animation range is for the case you want to cover a complete range. animation-range: enter sets it to enter 100% <bramus> s/sets it to enter 100%/sets it to enter 0% enter 100% <birtles> q+ <dael> flackr: Option 2 is closer to preserve existing delay as is and introduce animation range where you can spec a range, range start, range end and it maps to internal values. Effectively makes animation-delay somewhat of a legacy property b/c only specs start and range is everything delay does <Rossen_> q? <dael> fantasai: Third option is animation delay and animation range take effect at same time. Range set the range and delay is an inset into that itme <dael> fantasai: animation-range:entry and animation-delay:value I start that value into the range. <dael> fantasai: I think that has an advantage that it keeps delay simple and reasonable interaction between delay and range. <dael> fantasai: I think those are the proposals on the issue <dael> fantasai: My preference is 3rd <dael> flackr: I prefer 3rd as well <dael> birtles: I think we should think about why introduced group effects. Animation delay is relative to parent effect where if you have a sequence and delay b it'll offset start relative to a. Then what would an absolute delay mean? Or a range? We should think about that <dael> birtles: Maybe we would decide they should be separate and delay is effect and range is animation as a whole <bramus> q+ <Rossen_> ack b <Rossen_> ack b <dael> bramus: To make sure I understad, prop is to set an animation range to entry and then set an animation delay to 25% 75%. Is that correct? <dael> birtles: That sounds like what it would be. Animation range applies first and puts on timeline <Rossen_> ack fantasai <dael> flackr: Slight correction. you probably didn't mean 75% end delay. Animation-delay:end is same meaning where it's amount of time after effect. 25% 25% would do wha tyou expect <bramus> Got it <dael> fantasai: Suppose in future have named, time based ranges. And you say you want to animation this during window. Express the delay in ms and you can do start and end and ms cut into it. If we add length-based you could also cut in with a length <dael> fantasai: I think we still want to allow range to be entry 10% or whatever so you would add up %. If doing time + % it points to the point you've described. You add additional padding with the delay <dael> Rossen_: I'm trying to make sense of the silence. Looks like "okay" silence <dael> flackr: I think option 3 sounds good and might be better for previous issue <dael> Rossen_: Prop? <dael> fantasai: Animation range and animation delay are separate things that compound <dael> Rossen_: Additional opinions or objections? <dael> RESOLVED: Animation range and animation delay are separate things that compound |
I see several referenced commits but when I click through to them github says they don't belong to any branch. However, when I look at the spec it looks like maybe they landed. @fantasai is there more needed to close this? |
https://w3c.github.io/csswg-drafts/scroll-animations/#named-range-animation-declaration
What's the point of having 2 shorthands if both have the same grammar and expand to the same set of longhands in the same way?
@cdoublev also confused in #7044 (comment)
@bramus said
But then maybe restrict
animation-delay
to<time>{1,2}#
andanimation-range
to[ <timeline-range-name> <percentage>? ]{1,2}#
or something?The text was updated successfully, but these errors were encountered: