Re: [csswg-drafts] [css-timing] reconsider name of frames() timing function

The CSS Working Group just discussed `step function parameter names`, and agreed to the following resolutions:

* `RESOLVED: Use steps() function with the <integer> being number of visible frames during the animation duration`

<details><summary>The full IRC log of that discussion</summary>
&lt;tantek> topic: step function parameter names<br>
&lt;tantek> TabAtkins: strong objection to anything that resembles sizing or alignment keywords<br>
&lt;tantek> TabAtkins: they are extremely confusing<br>
&lt;tantek> TabAtkins: we have start and end already<br>
&lt;tantek> TabAtkins: imply dropping start or end step<br>
&lt;tantek> TabAtkins: we should come up with two keywords that fit that model<br>
&lt;tantek> astearns: one of the reasons I proposed both and neither<br>
&lt;tantek> Florian: it depends what what the step is, flat or verticle<br>
&lt;tantek> TabAtkins: flat<br>
&lt;tantek> fantasai: vertical<br>
&lt;tantek> s/verticle/vertical<br>
&lt;tantek> TabAtkins: I think for most authors the intuitive model is number of values received<br>
&lt;fantasai> ScribeNick: fantasai<br>
&lt;fantasai> birtles: If you have say, steps(2, start)<br>
&lt;fantasai> birtles: this is what you see as the timing function<br>
&lt;fantasai> birtles: If you're repeating this, you just see those two values, but if you apply this to a transition, you will see the pictures before and after the timing function<br>
&lt;fantasai> TabAtkins: The starting frame there isn't included in the value<br>
&lt;fantasai> birtles: But as an author you're seeing all three values<br>
&lt;fantasai> TabAtkins: if ou say I want transition to last 1s, and steps(2) and the time of the steps don't last .5s each, then it's bad<br>
&lt;fantasai> birtles: I disagree<br>
&lt;fantasai> birtles: We've already resolved we're sticking with steps() and the number is the number of jumps<br>
&lt;fantasai> https://github.com/w3c/csswg-drafts/issues/1301#issuecomment-310571203<br>
&lt;fantasai> TabAtkins: The argument from RachelNabors is that you can't accurately time a tansition or animation that during the preiod shows both the start and end value<br>
&lt;fantasai> TabAtkins: because right now you have to, during the transition, either the starting value is not shown and you jump immediately or<br>
&lt;fantasai> TabAtkins: During a single transition, if you want to see both start and end there, which is a use case RachelNabors brought up, you have to do some non-intuitive duration-manipulation to make it show correctly<br>
&lt;fantasai> TabAtkins: If you want a 3-step frame-based cartoon that lasts 3s then...<br>
&lt;fantasai> birtles: We're talking cross-purposes<br>
&lt;fantasai> birtles: We're all agreeing that this timing function exists<br>
&lt;fantasai> birtles: we're just talking about the syntax for it<br>
&lt;fantasai> birtles: We went over the number of steps this morning<br>
&lt;fantasai> birtles: and resolved on that aspect<br>
&lt;fantasai> dino: I think we agree that there are three steps there, if we're going up a staircase, there are three steps there.<br>
&lt;fantasai> fantasai: We're off-topic, the topic is the name of the keywords not the syntax of the function overall. That was resolved already.<br>
&lt;fantasai> TabAtkins: I object to that<br>
&lt;fantasai> fantasai: oesn't matter, you're off-topic<br>
&lt;fantasai> TabAtkins: There are 4 things being shown !<br>
&lt;fantasai> dino: 4 things shown is 3 steps<br>
&lt;fantasai> TabAtkins: You're thinking about the wrong things.<br>
&lt;fantasai> [rehash of arguments]<br>
&lt;fantasai> TabAtkins: I'm representing RachelNabors, nobody else is!<br>
&lt;fantasai> birtles: I presented the arguments on both sides, and explained why I think that the steps() syntax is the right way to go<br>
&lt;fantasai> birtles: Didn't go with frames() for two reasons<br>
&lt;fantasai> birtles: First is, it's less appropriate for contexts outside of looping animations<br>
&lt;fantasai> birtles: transitions and gradients being examples<br>
&lt;fantasai> birtles [gives more specific examples]<br>
&lt;fantasai> birtles: The other concern was discoverability<br>
&lt;fantasai> birtles: If you start with steps() and it's not quite right, then can't discover frames() behavior by adjusting arguments, and also need to change how you count<br>
&lt;fantasai> birtles: or vice versa<br>
&lt;fantasai> fremy: Your problem is that you count 3 here, what if instead we count 4, but keep it in the steps() function<br>
&lt;fantasai> TabAtkins: If the third one was steps(4, something) and the fourth one was steps(2, somethingelse) then it's fine.<br>
&lt;fantasai> fremy: So you don't object to using steps(), just object to using 3.<br>
&lt;dbaron> dino: So you're counting the number of places you put your foot rather than the number of times you go up.<br>
&lt;fantasai> TabAtkins: Want it to be number of things you see<br>
&lt;fantasai> gregwhitworth: Rachel does say that she's fine to re-use steps().<br>
&lt;ericwilligers> +q<br>
&lt;fantasai> birtles: The tricky bit is that in the first two cases, which we have right now, it just so happens that the number of values you see also matches the number of jumps<br>
&lt;fantasai> birtles: That's why that happens to be okay<br>
&lt;fantasai> birtles: But that's only true when your'e repeating<br>
&lt;fantasai> birtles: If you're transitioning or using animation-fill-mode, then you see more<br>
&lt;fantasai> TabAtkins: But that's not part of the duration<br>
&lt;fantasai> dino: Tab only cases where yo put your foot between the start and the end, doesn't care about what's before or after the start/end<br>
&lt;fantasai> ericwilligers: If we go with wher eyou put your foot, then the bottom left would be steps(4, neither) and the bottom right would be steps(2, both)<br>
&lt;dbaron> referring to the diagram in https://github.com/w3c/csswg-drafts/issues/1301#issuecomment-310571203<br>
&lt;fantasai> TabAtkins: Your'e showing neither start nor end during the duration<br>
&lt;gregwhitworth> ^ for reference - here is the comment where RachelNabors<br>
&lt;fantasai> TabAtkins: I think it would be better to have drop-* keywords or something<br>
&lt;gregwhitworth> ^ says that: https://github.com/w3c/csswg-drafts/issues/1301#issuecomment-299749586<br>
&lt;fantasai> TabAtkins: but then you'd have to  ...<br>
&lt;fantasai> [mumbling in the corner]<br>
&lt;fantasai> dbaron: I think start and end makde a lot of sense for step-start and step-end<br>
&lt;fantasai> [but maybe less so here]<br>
&lt;TabAtkins> TabAtkins: I agree. They are the correct start/end pairs for single steps.<br>
&lt;fantasai> astearns: So I've heard people say they don't like the idea of having the bottom left be steps(4) and the bototm right be steps(2), but does anyone object to the idea of counting places to put your foot?<br>
&lt;fantasai> TabAtkins: The other people talking about other interpolation stuffs also want 4 and 2<br>
&lt;fantasai> TabAtkins: So I think they're intuitive on their own<br>
&lt;fantasai> birtles: This is a frame based animation here<br>
&lt;fantasai> birtles projects a demo<br>
&lt;fantasai> birtles writes<br>
&lt;fantasai> animation: slide 3s infinite steps(10, start)<br>
&lt;fantasai> birtles: You see you miss frame 1<br>
&lt;birtles> http://slides.com/birtles/browser-animation-2017/live#/3/2<br>
&lt;fantasai> birtles: If I s/start/end, I start at 1, but don't se 10<br>
&lt;fantasai> birtles: If I say frames(11), then I get all the 10 frames<br>
&lt;fantasai> birtles: But to get this effect, I have to change the number<br>
&lt;fantasai> ...<br>
&lt;fantasai> birtles: If you're switching between the two, then you have to change the number<br>
&lt;fantasai> dbaron: Seems like we have one solution that isn't drawing strong objections from people<br>
&lt;fantasai> dbaron: which is to use the steps() function with two new keywords, and count the number of places you put your foot<br>
&lt;fantasai> Bert: Referring back, if you count the number of intermediate steps, there's only 9 intermediate steps<br>
&lt;fantasai> Bert: Some variations, you only see those 9 steps, the first and last are outside the animation itself<br>
&lt;fantasai> [everybody picks a number to shout]<br>
&lt;fantasai> TabAtkins: Using values 10  11 or 9 with some yet-undecided set of keywords, using steps() function name, seems to be drawing least objections.<br>
&lt;fantasai> TabAtkins: Anyone object to that, assuming good keyword names<br>
&lt;fantasai> dbaron: We need to find names that work with the numbers<br>
&lt;fantasai> astearns: Any objections to this proposal?<br>
&lt;dbaron> github: https://github.com/w3c/csswg-drafts/issues/1301<br>
&lt;fantasai> astearns: So we'll add to this morning's resolution that we'll use steps() function  with numbers that count the place where you put your foot<br>
&lt;fantasai> astearns: I'm concerned that this will prove confusing<br>
&lt;fantasai> Bert: If you allow 11 here, then 1 makes no sense<br>
&lt;fantasai> Bert: then why not lower the number, and say it's the number of intermediate values<br>
&lt;fantasai> ...<br>
&lt;fantasai> dbaron: Bert is concerned about the allowed range of integers, which will vary depending on the keyword<br>
&lt;dbaron> 1- for the existing keywords, and 0- and 2- for the new keywords<br>
&lt;fantasai> RESOLVED: Use steps() function with the &lt;integer> being number of visible frames during the animation duration<br>
&lt;fantasai> astearns: What should the keywords be<br>
&lt;fantasai> fantasai: If we were starting from scratch I have an ida<br>
&lt;dbaron> fantasai: ... we'd use the same kind of:  fill, start-fill, end-fill, and ... we have this concept of fill.<br>
&lt;TabAtkins> dbaron, actually I think the "intermediates only" is also 1+, not 0+.  You need to have at least one "intermediate" value to show!<br>
&lt;TabAtkins> dbaron, so the frames() use-case is 2+, the rest are 1+.<br>
&lt;fantasai> fill-start, fill-end, fill-between, fill-evenly<br>
&lt;fantasai> just like alignment<br>
&lt;dbaron> TabAtkins, actually, maybe the new ones are both 2+<br>
&lt;fantasai> fill is time that's filled by a frame<br>
&lt;TabAtkins> dbaron: Nah, "intermediate only" is fine to be 1 - it shows only the 50% value during the animation.<br>
&lt;fantasai> TabAtkins: I'd be ok with 4 new keywords to make a set<br>
&lt;fantasai> s/dbaron:/dbaron,/<br>
&lt;fantasai> TabAtkins: rather than adding to start+end<br>
&lt;fantasai> astearns: What if keywords were talking about where to jump<br>
&lt;dbaron> astearns: You could have the keywords say where you jump.  So you have steps(3, start), steps(3, end), steps(4, neither), or steps(2, both).<br>
&lt;fantasai> fremy: 4th one is intermediate only, only shows intermediate only<br>
&lt;fantasai> fremy: 3rd one includes ...<br>
&lt;fantasai> fremy: open set and closed set<br>
&lt;fantasai> fremy: intermediate and<br>
&lt;fantasai> TabAtkins: intermediate is over the desired spelling level<br>
&lt;fantasai> dino: Anyone wants 4th one?<br>
&lt;fantasai> TabAtkins: Yes, definitely have requests for that<br>
&lt;dbaron> Florian: _|¯<br>
&lt;fantasai> TabAtkins: esp for gradients<br>
&lt;Florian> steps(4, _-¯)     steps(2, -)<br>
&lt;TabAtkins> linear-gradient(red 20%, steps(5, middle-only), blue 80%) &lt;= 5 color stripes between the red and the blue<br>
&lt;fantasai> fantasai: So both and neither was ...? No, it's really confusing.<br>
&lt;fantasai> TabAtkins: As dbaron was saying, the start/end keywords make sense for the step-* keywords but not so much for the steps() function<br>
&lt;dbaron> Just as long as we don't use steps() and stairs() with two different meanings...<br>
&lt;SimonSapin> steps("▁▃▅▆▇███")<br>
&lt;fantasai> Florian: We do both and neither<br>
&lt;dbaron> Tab: show-end, show-start, show-both, show-neither<br>
&lt;fantasai> fremy: So both is show both start and end, and neither is ..<br>
&lt;fantasai> TabAtkins: No, that's backwards<br>
&lt;fantasai> TabAtkins: because of the way start and end are defined<br>
&lt;fantasai> fremy: screw it, we should do it this way around anyway<br>
&lt;fantasai> TabAtkins: that's okay if we have a prefix, like show-start or<br>
&lt;dbaron> (insert my previous line here)<br>
&lt;fantasai> astearns: So show-end is the same as start<br>
&lt;birtles> steps(4, frames)? (Not sure about the fourth option)<br>
&lt;fantasai> TabAtkins: if we do show keywords we do it this way, if we do drop kewyrods we can match start/end<br>
&lt;fantasai> TabAtkins: But it also was pointed out that drop has some weird impliciations of dropping a frame<br>
&lt;fantasai> TabAtkins: show-* doesn't have that problem or one of adding a frame<br>
&lt;fantasai> dbaron: stripes? :)<br>
&lt;dbaron> (somebody said before me that frames was for animations and the other one was for gradients)<br>
&lt;fantasai> birtles: steps(4, frames) steps(2, stripes)<br>
&lt;fantasai> dbaron: though they all give stripes, just a different set of stripes<br>
&lt;fantasai> fantasai: Oh, I like that Bert. That's better than using start/end with opposite meanings<br>
&lt;melanierichards>  +1 to Bert's idea<br>
&lt;Bert> (Putting it on the record: just thinking aloud, but how about: step(n [, show-first || show-last]?) )<br>
&lt;fantasai> although I'd still have both keyword, because it's easier to type<br>
&lt;dbaron> actually 0 does work as the number for the fourth option<br>
&lt;fantasai> and also, how do you get the 4th variant?<br>
&lt;fantasai> Rossen and Tab discuss some examples<br>
&lt;fantasai> TabAtkins: Let's go back to thread with what we've concluded and ask for help<br>
&lt;fantasai> astearns: maybe we should open a new issue<br>
&lt;fantasai> astearns: OK, let's close this issue and open a new one on the new keywords<br>
&lt;TabAtkins> Bert, can't do that one unfortunately, because the "no keyword" case (steps(3)) already means steps(3, start). :(<br>
&lt;TabAtkins> s/steps(3, start)/steps(3, end)/<br>
&lt;fantasai> https://github.com/w3c/csswg-drafts/issues/1609<br>
&lt;fantasai> we could do 1609 but ppl might be fried<br>
&lt;fantasai> sorry https://github.com/w3c/csswg-drafts/issues/951<br>
&lt;fantasai> https://github.com/w3c/csswg-drafts/issues/951#issuecomment-316535854<br>
</details>


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

Received on Wednesday, 2 August 2017 15:38:45 UTC