-
Notifications
You must be signed in to change notification settings - Fork 715
[css-easing-2] Bikeshed function name for custom easings #7419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
👍 This comment to vote for |
👍 This comment to vote for |
👍 This comment to vote for |
👍 This comment to vote for |
👍 This comment to vote for |
I think Also Even though |
I don't think |
Why not |
I don't think it's useful to draw an implicit connection to Strongly opposed to Mildly opposed to Would be okay with
|
Huh, I thought you could? For example,
They're pretty related, in that they all return easing functions. I think the main problem with
I guess you're not convinced by future extensions that would make it non-linear, eg
Fair enough. I guess we'd come up with a different method name if we want to allow non-linear parts. |
Title: Bikeshed function name for custom easings Question: What should we call the function that allows developers to define custom easings? Solution: already in title and question 😜 I mean ... why do we need to find a different name for something that is already described? |
|
fair enough ... we have the second word left then 😊 ... the one I voted 👋 |
Yeah, I think the choice is coming down to |
imho |
I agree that |
I think |
Oh duh, indeed, that does the job. Not technically discontinuous but for all intents and purposes is. (On that note, is it well-defined what the behavior is at such points? I forget whether steps takes the earlier or later value at its discontinuities, but we should match.) |
I asked the same question in internal chat and didn't get a certain answer. From my testing it seems like last-point-wins, so that's what I've written in the spec. |
How about facet()? |
Also, the property for using these functions in Web animations is called |
I don't think it's any more redundant than |
Yeah, I don't think that redundancy is problematic, I'm just strongly against |
I'm going to go with |
I've applied this change in jakearchibald#1 |
Uh oh!
There was an error while loading. Please reload this page.
What should we call the function that allows developers to define custom easings?
Feature description
The arguments are a comma-separated groups of:
The values work very similar to
linear-gradient
.function-name(0, 0.7, 0.87, 0.98, 1)
- this creates 5 points:Which is equivalent to
function-name(0 0%, 0.7 25%, 0.87 50%, 0.98 75%, 1 100%)
, as points without a 'start input' are given one automatically (using the same process as linear gradients).The third value, again similar to gradients, can be used to create an extra point using the same output value. So
function-name(0, 0.5 25% 75%, 1)
creates 4 points:Output values will typically be 0-1, but can be outside of that, as they can with
cubic-bezier
. A likely usage here will be elastic/spring easings.Similarly, input values will typically be 0%-100%, but can extend beyond that to provide points for edge-cases where easings are chained.
The ends of the graph automatically extend beyond their specified point using their final angle, so the previous easing (
function-name(0, 0.5 25% 75%, 1)
) would extend like this:However, if the final two points are in the same position, the line extends horizontally, so
function-name(0, 0.5 25% 75%, 1 100% 100%)
(the difference being the100% 100%
at the end), would be:Option 1:
linear()
Why:
linear
is already an easing keyword. It would be redefined to be shorthand forlinear(0, 1)
.linear-gradient()
, which starts withlinear
(although there 'linear' mostly refers to direction than interpolation).Why not:
People seem initially confused by this, as they expect linear to be a single line. When I explain "but it's still linear, but between points", they roll their eyes as if I've found a loophole 😄
Option 2:
linear-spline()
Why:
Why not:
Option 3:
ease()
Why:
ease
,ease-in
,ease-out
etc.ease(0, ease-out to 0.5, ease-in to 1)
Why not:
ease
already exists as a shothand keyword forcubic-bezier(0.25, 0.1, 0.25, 1)
, so the keyword usage is pretty different to the function usage.Option 3.5:
easing()
As above, but avoids the naming clash with the keyword
ease
.Option 4:
piecewise()
Why:
Why not:
Note: This is a discussion of the function name only, not the format of the function overall.
The text was updated successfully, but these errors were encountered: