- From: Kevin Babbitt via GitHub <sysbot+gh@w3.org>
- Date: Wed, 19 Mar 2025 18:35:15 +0000
- To: public-css-archive@w3.org
During the discussion I was mulling over how the caching rules would interact with animations. I guess as written, if `random()` is used on a property in a keyframe, the caching rules would take effect per-keyframe in the context of the element the animation is applied to, and that seems like it would result in sensible behaviors. But it made me wonder if there's an additional dimension authors might want: per-iteration randomness. For example, I might implement a randomly-bouncing-around animation like this: ```css @keyframes bounce { 0% { left: 0px; top: random(match-element, 0px, 1000px); } 25% { left: random(match-element, 0px, 1000px); top: 1000px; } 50% { left: 1000px; top: random(match-element, 0px, 1000px); } 75% { left: random(match-element, 0px, 1000px); top: 0px; } } ``` Where I want lots of elements to follow the same randomized path, maybe with different timing offsets so they "follow" each other, but I also want different random values drawn each time the animation cycles. -- GitHub Notification of comment by kbabbitt Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11742#issuecomment-2737662313 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 18:35:16 UTC