Re: [csswg-drafts] [css-values-5] Maybe min, max and step should not be part of the random-caching-key (#11742)

> [@kbabbitt](https://github.com/kbabbitt) With the current proposal you should be able to use the custom ident for that:
> 
> ```
> @keyframes bounce {
>    0% { left: 0px; top: random(match-element --iteration-1, 0px, 1000px); }
>   25% { left: random(match-element --iteration-2, 0px, 1000px); top: 1000px; }
>   50% { left: 1000px; top: random(match-element --iteration-3, 0px, 1000px); }
>   75% { left: random(match-element --iteration-4, 0px, 1000px); top: 0px; }
> }
> ```

@nt1m as I understood the proposal, that would select a random value once for each keyframe, and then reuse those same values for every iteration of the animation. Is that not the case?

The use case I suggested called for a new random value, for every keyframe, for every iteration, but each time a random value is drawn, all elements to which the animation is applied get the same value.

-- 
GitHub Notification of comment by kbabbitt
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11742#issuecomment-2738073385 using your GitHub account


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

Received on Wednesday, 19 March 2025 20:47:12 UTC