Closed dbaron closed 7 years ago
Ok, since we're bikeshedding names now, what about discrete()
?
That sounds like renaming it to
values()
would help.I can get behind that! And it works well for gradients as well, avoiding @LeaVerou's concern.
While I proposed it, I agree with the others that it's a pretty vague name. I'm still for extending the steps()
function somehow. parts()
, partitions()
, fragments()
, and segments()
are similarly good, but none of them fits perfectly to all examples outlined by Brian.
Sebastian
This is almost certainly a dumb question, but why are all these special cases needed? Why can't the correct behaviour be deduced in the animation logic?
For example:
frames(N)
; Do something similar looking at the final state (accounting for fill) on the the last run.
And automatically drop the first frame, on the first run, if it it resembles the state before the animation started.
Make frames()
do the right thing out the box. If necessary, steps()
can be extended for those rare cases when the right thing is wrong.
@fuchsia Automatically changing the behavior of a timing function based on the values of other properties is unlikely to be less confusing - it means you can't predict from looking at it how long each frame is! In particular, your suggested code would make the first/last iteration either have frames of different length than the rest of the animation, or have an iteration of different length from the rest of the animation. Both of these have a high chance of being bad due to things becoming unmatched.
Both Firefox and Chrome have decided to delay shipping frames()
for the time being to allow this discussion to play out without being constrained by shipping implementations.
@tabatkins I think I thought user were being forced to make those decisions explicitly, with the bonus cognitive load of having to grok the issues in the first place. But I probably haven't understood it properly myself, so I'll stop digging (unless you want to use me to rubber duck debug the API.)
The CSS Working Group just discussed Name for frames() function.
, and agreed to the following resolutions:
RESOLVED: Renames frames to steps, argument name TBD.
Talking with @fantasai during the break, I like center
, stretch
(spread
?). @fantasai likes space-evenly
, space-between
and is concerned that if we were to go with center
, stretch
and later decided we wanted a version that behaves like space-around
we will wish we used the space-*
naming to begin with.
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
New issue for the keywords: https://github.com/w3c/csswg-drafts/issues/1680
From https://github.com/w3ctag/design-reviews/issues/161#issuecomment-297617664, it would be good to reconsider the name of the
frames()
timing function.