Skip to content
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

Review request: linear() easing function #761

Closed
1 task done
emilio opened this issue Aug 1, 2022 · 2 comments
Closed
1 task done

Review request: linear() easing function #761

emilio opened this issue Aug 1, 2022 · 2 comments
Assignees
Labels
Resolution: satisfied The TAG is satisfied with this design Topic: CSS Venue: CSS WG

Comments

@emilio
Copy link

emilio commented Aug 1, 2022

Wotcher TAG!

I'm requesting a TAG review of the linear() CSS easing function.

This is a custom easing function that allows easings to be defined by a series of points that are linearly interpolated. The idea is that this allows to approximate a lot of custom easings in a simple way. There's a lot more of background in w3c/csswg-drafts#229.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • Relevant time constraints or deadlines: Not super urgent, but I think it should be a relatively straight-forward review, it is relatively simple and allows extension / further improvements.
  • The group where the work on this specification is currently being done: CSSWG
  • Major unresolved issues with or opposition to this specification: None, I think

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

@jakearchibald
Copy link

jakearchibald commented Aug 1, 2022

I think the examples are a good starting point to learn about the feature https://drafts.csswg.org/css-easing-2/#linear-easing-function-examples.

Some bikeshedding on the naming, which may be of interest: w3c/csswg-drafts#7419.

A common question that comes up is "why doesn't this support curves?", so I'll preemptively address that:

Firstly, not all easings use curves. We already have step(), for instance. Right now, if you use step(), it interpolates linearly over a given number of steps, whereas with linear(), you can create a stepped-easing that's non-linear.

But mostly, this feature isn't supposed to be instead of a curve-based solution, but it's something developers can use until a curve-based solution is designed.

The original issue is from 2016, and progress seemed to stall whenever folks tried to figure out how to incorporate curves.

I deliberately chose linear-gradient-like syntax because it's also a one-dimensional series of points, but it's also another feature that could benefit from non-linear interpolation. I'm hoping the solution for one will work for the other.

I plan to create a developer tool to convert JavaScript and SVG-based easings into linear() format. Here are some super-rough prototypes of that, for a few of predefined easings:

dshin-moz added a commit to dshin-moz/content that referenced this issue Aug 16, 2022
Implementation is complete as per draft spec: https://drafts.csswg.org/css-easing-2/#the-linear-easing-function
The spec is under review (w3ctag/design-reviews#761) so it's gated behind a pref.
dshin-moz added a commit to dshin-moz/content that referenced this issue Aug 17, 2022
Implementation is complete as per draft spec: https://drafts.csswg.org/css-easing-2/#the-linear-easing-function
The spec is under review (w3ctag/design-reviews#761) so it's gated behind a pref.
@plinss plinss added this to the 2022-10-10-week milestone Sep 29, 2022
@plinss
Copy link
Member

plinss commented Oct 10, 2022

We don't see any issues with this. Thanks for flying TAG.

@plinss plinss closed this as completed Oct 10, 2022
@plinss plinss added the Resolution: satisfied The TAG is satisfied with this design label Oct 10, 2022
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: satisfied The TAG is satisfied with this design Topic: CSS Venue: CSS WG
Projects
None yet
Development

No branches or pull requests

4 participants