Re: [csswg-drafts] [scroll-animations-1] Allow `<length-percentage>` in `<keyframe-selector>` when combined with `<timeline-range-name>` (#10000)

The CSS Working Group just discussed ``[scroll-animations-1] Allow `<length-percentage>` in `<keyframe-selector>` when combined with `<timeline-range-name>` ``, and agreed to the following:

* ``RESOLVED: Allow `<length-percentage>` in keyframe selectors (with or without `<timeline-range-name>`)``

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> bramus: this is about the syntax in the keyframe selector (currently `&lt;percentage>` and `&lt;timeline-range-name>`<br>
&lt;emilio> *)<br>
&lt;emilio> ... But in CSS you can specify `animation-range: entry calc(0% + 100px)`<br>
&lt;emilio> ... problem is this is not allowed in keyframes<br>
&lt;emilio> ... you can attach an animation to specified range that uses calc()<br>
&lt;emilio> ... if you have keyframes that contains ranges<br>
&lt;emilio> ... you can't<br>
&lt;emilio> ... so inside `@keyframes { cover 0% { ... } }`, but you can't do `@keyframes { cover calc(...) { ... } }`<br>
&lt;emilio> ... proposal is to change the syntax from percentage when timeline range name to also accept `&lt;length-percentage>`<br>
&lt;emilio> ... so that you can choose to attach one animation or keyframes with predefine range info<br>
&lt;emilio> q+<br>
&lt;astearns> ack emilio<br>
&lt;emilio> emilio: what happens if the keyframe containing pixels is attached to the doc timeline (time based)<br>
&lt;emilio> bramus: I believe they get ignored<br>
&lt;emilio> emilio: seems fine I guess<br>
&lt;bramus> emilio: seems fine<br>
&lt;TabAtkins> emilio: seems fine<br>
&lt;bramus> emilio: seems consistent with previous issue rsolution<br>
&lt;bramus> … as long as its well defined when it does not apply<br>
&lt;bramus> bramus: that is already covered<br>
&lt;emilio> PROPOSED: Allow `&lt;length-percentage>` in keyframe selectors<br>
&lt;emilio> bramus: not exactly<br>
&lt;emilio> ... bigger than what I asked but could work<br>
&lt;emilio> emilio: so you only wanted where you already have a range name<br>
&lt;emilio> bramus: right<br>
&lt;ydaniv> q+<br>
&lt;emilio> emilio: but on the previous issue we resolved that we want math functions there so allowing this seems consistent with that<br>
&lt;bramus> `&lt;keyframe-selector> = from | to | &lt;length-percentage> | &lt;timeline-range-name> &lt;length-percentage>`<br>
&lt;flackr> In the future, could do something like calc(50% + 1s)<br>
&lt;bramus> bramus: so this would be the syntax then ^<br>
&lt;astearns> ack ydaniv<br>
&lt;emilio> ydaniv: in order to make this apply to scroll timeline you also need plain `&lt;length-percentage>`<br>
&lt;bramus> bramus: not really, as we have scroll range now<br>
&lt;emilio> bramus: not really because we decided to add the scroll range to scroll-timeline<br>
&lt;emilio> ... but would be nice<br>
&lt;astearns> bramus: not really<br>
&lt;bramus> emilio: seems ok<br>
&lt;kizu> +1<br>
&lt;emilio> PROPOSED: Allow `&lt;length-percentage>` in keyframe selectors (with or without `&lt;timeline-range-name>`)<br>
&lt;emilio> RESOLVED: Allow `&lt;length-percentage>` in keyframe selectors (with or without `&lt;timeline-range-name>`)<br>
&lt;emilio> fantasai: what about time based anims?<br>
&lt;emilio> emilio: get ignored apparently<br>
</details>


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


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

Received on Friday, 31 January 2025 23:37:14 UTC