Re: [csswg-drafts] [pointer-animations-1] Pointer timeline ranges (#12507)

The CSS Working Group just discussed `[pointer-animations-1] Pointer timeline ranges`.

<details><summary>The full IRC log of that discussion</summary>
&lt;kbabbitt> ydaniv: pointer animations, considering what I said about effects usually used for pointer animations<br>
&lt;kbabbitt> ... require something different<br>
&lt;kbabbitt> ... no concept of entyr and exit for pointer animations<br>
&lt;kbabbitt> ... in the issue itself I listed drawings<br>
&lt;kbabbitt> ... and listed the 4 suggested ranges<br>
&lt;kbabbitt> ... which is basically everything I could think of that we could possibly want to have<br>
&lt;kbabbitt> ... open to suggestions, thjis is what I started with in spec<br>
&lt;kbabbitt> ... I put labels, what is viewport timeline and target<br>
&lt;kbabbitt> ... outer one is viewport, all these examples use an element as timeline, and then target element<br>
&lt;kbabbitt> ... so ranges I suggested are: fill<br>
&lt;kbabbitt> ... just use the 0 as startinh edge of timeine, 100% as end edge of timeline<br>
&lt;kbabbitt> ... and if you specify a center that is not the normal center, not the source 50%<br>
&lt;kbabbitt> ... then it would squish<br>
&lt;kbabbitt> ... the interpolation<br>
&lt;kbabbitt> ... between 50 and 0 and 50 and 100<br>
&lt;kbabbitt> ... just fill that space<br>
&lt;flackr> q+<br>
&lt;kbabbitt> ... concept of this name is somewhat taken from object-fit<br>
&lt;kbabbitt> astearns: coming from discussion earlier, fill is the version that does squish portions of the timeline<br>
&lt;astearns> ack flackr<br>
&lt;kbabbitt> ... but the only one<br>
&lt;kbabbitt> flackr: do you have examples where fill or cover which both change the rate of progression<br>
&lt;kbabbitt> ... are desirable<br>
&lt;kbabbitt> ... in my mind, I only imagined fit as the thing everyone would want<br>
&lt;kbabbitt> ydaniv: I didn't cover the rest of them, but we used only cover<br>
&lt;kbabbitt> ... so that you always get a timeline covering the whole possible area<br>
&lt;kbabbitt> astearns: clarification: cover does not change the rate of progression, it only changes the effective range where th eanimation happens?<br>
&lt;kbabbitt> flackr: if you have multiple targets and one results in cover being larger than the other the rate of animation is different between the targets<br>
&lt;kbabbitt> ... for a single animation the rate is constant<br>
&lt;kbabbitt> astearns; but it can cjhange between different subjects<br>
&lt;kbabbitt> ydaniv; depends on the effect you want. if you want a lot of elements in different places to act together then maybe you'd use different range<br>
&lt;kbabbitt> ... but what we shipped to users was just cover<br>
&lt;kbabbitt> ... which was mostly what everyone wanted<br>
&lt;kbabbitt> ... there were no complaints<br>
&lt;kbabbitt> ... it could change if you use the viewport as your timeline<br>
&lt;kbabbitt> ... then as you scroll and then move your pointer it does change the interpolation range<br>
&lt;kbabbitt> ... because suddenly one end is closer to yout 50% point<br>
&lt;kbabbitt> ... and at another point of the scroll it could be another end<br>
&lt;kbabbitt> ... so it does change interpolation as you scroll<br>
&lt;kbabbitt> ... but all these effects used delaued timeline<br>
&lt;kbabbitt> ... with transitoins and polyfill it doesn't jump<br>
&lt;kbabbitt> ... visually<br>
&lt;kbabbitt> ... you scroll and of course when you scroll the browser stll doesn't update pointer position until you move pointer<br>
&lt;kbabbitt> ... and then range needs to be recalculated<br>
&lt;kbabbitt> ... and you get transition effect to new position<br>
&lt;kbabbitt> .... these cases where you have ... it couldf be also if timeline is an element and it's fixedpos<br>
&lt;kbabbitt> flackr: with fit, this requires that the rate of progression is different on either side of the midpoint<br>
&lt;kbabbitt> ... currently the way animation-range works<br>
&lt;kbabbitt> ydaniv: with cover it's not<br>
&lt;kbabbitt> ... with cover it's always mirrored<br>
&lt;kbabbitt> flackr: with fill, this is not currently supported by the calcs we do for animation-range<br>
&lt;kbabbitt> ... the way animation range is applied is we calc a start time and duration for animation<br>
&lt;kbabbitt> ... and it's linearprogression throughout times between start and duration<br>
&lt;kbabbitt> ... so this will require some sort of transformation step<br>
&lt;kbabbitt> ... for how we map animation timeline into progress<br>
&lt;kbabbitt> ... tajht I guess needs to be added to web animations<br>
&lt;kbabbitt> ... not to say it can't be done but adds complexity<br>
&lt;kbabbitt> ... mayube avoid for now<br>
&lt;kbabbitt> ydaniv: we could avoid<br>
&lt;kbabbitt> ... not sure I have use cases for that<br>
&lt;kbabbitt> ... mor necessary ones are the other 3. or fit and cover<br>
&lt;kbabbitt> ... we could start with that<br>
&lt;kbabbitt> flackr: that also maps to image sizing<br>
&lt;kbabbitt> ... we don't have a version of image sizing with asummetric scaling<br>
&lt;kbabbitt> ydaniv: maps to stretching but not automagic<br>
&lt;kbabbitt> ... I'm fine with dropping it for first version<br>
&lt;kbabbitt> flackr: that reminds me of why I was thinking diff scales could be problematic<br>
&lt;kbabbitt> ... if we apply cover ... cover applies per-axis<br>
&lt;kbabbitt> ... becuse those are independend pointer timelines<br>
&lt;kbabbitt> ydaniv: yes<br>
&lt;kbabbitt> flackr: so you can end up with one ofyour axes changing faster than the other if you were trying to coordinate an effect between those 2 things<br>
&lt;kbabbitt> ... I assume in practice it hasn't been a problem?<br>
&lt;kbabbitt> ... for example ifyour taget element is centered horizontally but is vertically near bottom of viewport<br>
&lt;kbabbitt> ... whje you move pointer horizontally yuou preogress quickly through horizontal effect<br>
&lt;kbabbitt> ... but vertical effect will be slower apparently<br>
&lt;kbabbitt> ydaniv: that's ok<br>
&lt;kbabbitt> ... as long as I control centering of both of them it's expected that effect is porportional to that range<br>
&lt;kbabbitt> ... because that's what you asked for<br>
&lt;kbabbitt> ... if you don't want that to change according to position, you'd need to use a container<br>
&lt;kbabbitt> ... and then that would say, the rate of change would be static<br>
&lt;kbabbitt> ... not as if they used entire viewport<br>
&lt;kbabbitt> ... and as you scroll you get different interpolations<br>
&lt;kbabbitt> flackr: ok<br>
&lt;kbabbitt> ydaniv: for what we shjipped we used the viewport ,nobody complained<br>
&lt;kbabbitt> ... agree there are many use cases fo rjust a container<br>
&lt;kbabbitt> ... certain point where timeline activates<br>
&lt;kbabbitt> ... don't have visual distinction<br>
&lt;kbabbitt> ... depends on your design<br>
&lt;kbabbitt> astearns: are we arriving at a proposed resolution that we accept only the fit and cover ?<br>
&lt;kbabbitt> ydaniv: and contain?<br>
&lt;flackr> q+<br>
&lt;kbabbitt> ... not sure if it's really about use cases for it, but contain is like instead of using farthest as reference point, search for closest edge<br>
&lt;kbabbitt> ... and then mirrors that<br>
&lt;astearns> ack flackr<br>
&lt;kbabbitt> flackr: the last point, not objecting<br>
&lt;kbabbitt> ... this is basically the equivalent of animation-duration<br>
&lt;kbabbitt> ... would it make sense to put these keywords on animation-duration instead?<br>
&lt;kbabbitt> ... what this is calculating is the duration of the animation<br>
&lt;kbabbitt> astearns: what does animation-duration currently take?<br>
&lt;kbabbitt> flackr: auto or &lt;time><br>
&lt;kbabbitt> astearns: ok<br>
&lt;kbabbitt> ydaniv: one problem I wanted to raise<br>
&lt;kbabbitt> ... proposal has something like 3 options<br>
&lt;kbabbitt> ... as I wrote this issue, I realized this doesn't really map well with start and end range<br>
&lt;kbabbitt> ... more of a range span<br>
&lt;kbabbitt> ... because you don't want to set this independently for start and end<br>
&lt;kbabbitt> ... silly to have cover 0% and then contain 100%<br>
&lt;kbabbitt> ... it's more of just give me a span<br>
&lt;kbabbitt> ... so maybe the solution would be to move this somehow into duration<br>
&lt;kbabbitt> flackr: I understand it may sound awkward, but that is what it is calculating<br>
&lt;kbabbitt> ... we should also consider how this would interact with a specified value for range start instead of range center<br>
&lt;kbabbitt> ... if I have a range start specified, it might also make sense to have a duration that fits to different meanings<br>
&lt;kbabbitt> ydaniv: one option in the proposal is maybe instead of cover and contain, use farthest and closest<br>
&lt;kbabbitt> ... but again I don't find it very useful<br>
&lt;kbabbitt> ... will also cause squishing of timeline<br>
&lt;kbabbitt> astearns: only if you don't use symmetrical ??<br>
&lt;astearns> s/??/start and ends/<br>
&lt;kbabbitt> ydaniv: and I'd rather have one word like range span to alway srestrict using something<br>
&lt;kbabbitt> ... that controls the entire timeline, like both ranges<br>
&lt;kbabbitt> ... so instead of whole timeline, emerging pattern is, you have span and centering<br>
&lt;kbabbitt> astearns: you say emerging pattern, others would say not following convention<br>
&lt;kbabbitt> flackr: it's just that the thing this span is calculating is the length of the animation<br>
&lt;kbabbitt> ... it is duration and it feels we should avoid an additional property<br>
&lt;kbabbitt> ... and maybe add values to duration property<br>
&lt;kbabbitt> ... keywords sound fine to me, cover and contain<br>
&lt;kbabbitt> ... those have a lot of value and do map to analagous concepts<br>
&lt;kbabbitt> astearns: I like this direction but would like to see how it all fits with what we have now<br>
&lt;kbabbitt> ... and have the meanings of these keywords defined for other timelines<br>
&lt;kbabbitt> flackr: and for specifying start or end instead of center<br>
&lt;kbabbitt> ... because essentially you're setting up 2 of 3 constraints on an animation and calculating the third<br>
&lt;kbabbitt> astearns: would it be oka to take this back to issue and see if it can beshoehorned into duration?<br>
&lt;kbabbitt> ydaniv: sure<br>
&lt;kbabbitt> astearns: then let's do that but I am much happier with my undestanding of pointert animations given this discussion, thank you<br>
&lt;ydaniv> scribe+<br>
</details>


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


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

Received on Thursday, 21 August 2025 14:21:07 UTC