Re: [csswg-drafts] [scroll-animations-1] Allow optional `<percentage>` in `animation-range-*` (#8438)

The CSS Working Group just discussed ``[scroll-animations-1] Allow optional `<percentage>` in `animation-range-*` ``, and agreed to the following:

* `RESOLVED:  Make <percentage> optional in animation-range-start/end, defaulting to 0%/100%`
* `RESOLVED: When specifying "animation-range: foo X%", set the -range-end to "foo 100%" (staying in same phase, just setting to end)`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> -> https://github.com/w3c/csswg-drafts/issues/8438#issuecomment-1464672747<br>
&lt;TabAtkins> fantasai: there was discussion about %s in teh syntax of animation-range<br>
&lt;TabAtkins> fantasai: Can specify the shorthand to a name, but the longhands currently require a %<br>
&lt;TabAtkins> fantasai: One proposal is to make that optional - if omitted it defaults to 0%/100% depending on prop<br>
&lt;TabAtkins> flackr: sounds fine to me<br>
&lt;bramus> +1<br>
&lt;TabAtkins> TabAtkins: +1<br>
&lt;TabAtkins> astearns: proposed resolution is to make % optional in animation-range-start/end, defaulting to 0%/100%<br>
&lt;fantasai> PROPOSAL: Make &lt;percentage> optional in animation-range-start/end, defaulting to 0%/100%<br>
&lt;TabAtkins> RESOLVED:  Make &lt;percentage> optional in animation-range-start/end, defaulting to 0%/100%<br>
&lt;fantasai> animation-range: name x%<br>
&lt;TabAtkins> fantasai: if yous pecify `animation-range: name %`, currently it sets animation-range-start to that, and leaves -end as normal<br>
&lt;fantasai> animation-range-start: name x%; animation-range-end: normal<br>
&lt;fantasai> animation-range-start: name x%; animation-range-end: name (100 - x)%<br>
&lt;TabAtkins> fantasai: The alternative is to expand it to this ^^<br>
&lt;TabAtkins> fantasai: so if you say "contain 5%", it'll set them to "contain 5%" and "contain 95%", so you're insetting from either end<br>
&lt;TabAtkins> flackr: I put this forward bc it felt odd to take the specified % from the start, but ending in a potentially totally different animation range<br>
&lt;ydaniv> q+<br>
&lt;TabAtkins> flackr: felt consistent with margin/padding that get spammed to the other side of the block.<br>
&lt;astearns> ack ydaniv<br>
&lt;TabAtkins> ydaniv: q is do we want to change the range as well - if start is "entry" do we use "exit" in the end?<br>
&lt;TabAtkins> fantasai: Seems maybe too magical? Don't you want contain/cover?<br>
&lt;TabAtkins> YehonatanDaniv: For those the proposal makes sense. Seems funky that for entry 5% we expand to entry 95%<br>
&lt;TabAtkins> flackr: You can already use 'contain' to do that, but there are use-cases for keeping it in the same range. So i'd prefer not to.<br>
&lt;TabAtkins> fantasai: I'd understand if you wanted to expand "name X%" to "name X%" and "name 100%"<br>
&lt;TabAtkins> fantasai: so we'd take the name and set it to both longhands, but only use the % in start<br>
&lt;flackr> animation-range-start: name x%; animation-range-end: name 100%<br>
&lt;fantasai> animation-range: name x%<br>
&lt;fantasai> 1) animation-range-start: name x%; animation-range-end: normal<br>
&lt;fantasai> 2) animation-range-start: name x%; animation-range-end: name (100 - x)%<br>
&lt;fantasai> 3) animation-range-start: name x%; animation-range-end: name 100%<br>
&lt;TabAtkins> (this was gonna be my suggestion too - if the concern is just that setting 'end' to an unrelated phase, it seems reasonable to just set to that phase with 100%)<br>
&lt;TabAtkins> flackr: good with 2 or 3<br>
&lt;TabAtkins> fantasai: Slight pref for 3, okay with 2<br>
&lt;TabAtkins> TabAtkins: prefer 3<br>
&lt;TabAtkins> emilio: Also prefer 3<br>
&lt;TabAtkins> emilio: 2 seems too magic<br>
&lt;fantasai> TabAtkins: particularly, I don't know what 2 would do if you start at 55% :)<br>
&lt;TabAtkins> astearns: Do we think we'll get a second % in animation-range at some point?<br>
&lt;TabAtkins> fantasai: You can specify "name % name %" to end wherever you want<br>
&lt;TabAtkins> fantasai: In theory we could say "name % %" default to the previous name<br>
&lt;ydaniv> staying with 3 (:<br>
&lt;TabAtkins> astearns: If we already have the syntax, no need to complicate until people ask for it<br>
&lt;TabAtkins> astearns: So seems like we have option 3 consensus<br>
&lt;TabAtkins> RESOLVED: When specifying "animation-range: foo X%", set the -range-end to "foo 100%" (staying in same phase, just setting to end)<br>
&lt;fantasai> ACTION: file issue on 3-value syntax<br>
</details>


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


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

Received on Monday, 20 March 2023 15:38:14 UTC