Re: [csswg-drafts] [css-easing] Allow `steps()` to accept an easing function as the `<step-position>` (#11970)

The CSS Working Group just discussed ``[css-easing] Allow `steps()` to accept an easing function as the `<step-position>` ``, and agreed to the following:

* `RESOLVED: Allow simple easing functions as params to steps() as described in the issue`
* `ACTION: Make sure there's an open issue on composing easing functions`

<details><summary>The full IRC log of that discussion</summary>
&lt;bramus> Demo: https://vasilis.nl/clocks/station-clock/01/<br>
&lt;fantasai> bramus: recreates a clock, wants to have some easing in between seconds<br>
&lt;fantasai> bramus: but steps() defines a number of steps and then creates a staircase<br>
&lt;TabAtkins> q+<br>
&lt;fantasai> bramus: suggestion to add extra argument that allows to specify easing<br>
&lt;bramus> https://github.com/w3c/csswg-drafts/issues/11970#issuecomment-2747746414<br>
&lt;flackr> q+<br>
&lt;fantasai> bramus: This demo I shared in IRC, very useful to have `steps(ease, 60)` which would give the chart here<br>
&lt;fantasai> bramus: Otherwise author has to pre-generate keyframes with 60 entries etc.<br>
&lt;astearns> ack TabAtkins<br>
&lt;fantasai> TabAtkins: fantasai and I reviewed before F2F and think it's a fine idea<br>
&lt;fantasai> TabAtkins: Just need to make sure exactly where the intermediate values are. Diagram matches what we expect - match jump-start/jump-end rather than jump-none/jump-both<br>
&lt;kizu> +1 too<br>
&lt;fantasai> TabAtkins: Would just add this instead of existing keywords<br>
&lt;astearns> ack flackr<br>
&lt;fantasai> flackr: One of the easing possibilities is steps() ...<br>
&lt;fantasai> TabAtkins: Oh. Yeah everything except those. :)<br>
&lt;fantasai> flackr: Broadly that seems reasonable.<br>
&lt;fantasai> flackr: For the original use case, compsiting animations would work<br>
&lt;fantasai> flackr: We also have iteration-delay to delay repeated animations<br>
&lt;fantasai> flackr: Not opposed to having both, but there is a path to solving the problem<br>
&lt;fantasai> flackr: which gives you different controls over the space, potentially<br>
&lt;fantasai> flackr: For example, what if you wanted an ease animation starting from halfway through a step?<br>
&lt;ChrisLilley> q+ to complain a bit<br>
&lt;fantasai> flackr: iteration-delay 500ms + ease would have that solution<br>
&lt;fantasai> bramus: Would that block this addition?<br>
&lt;fantasai> flackr: Going back to original use case, usually the tick itself is much less than 1s long.<br>
&lt;fantasai> flackr: You want 100ms animation at each second<br>
&lt;fantasai> flackr: So I'm worried that the solution proposed here makes that case difficult<br>
&lt;fantasai> flackr: because you want linear with delayed effect<br>
&lt;fantasai> TabAtkins: If you wanted to do iterations, how would you set it up?<br>
&lt;fantasai> flackr: You could have a single animation of a single second rotation<br>
&lt;fantasai> flackr: 1s arc rotation<br>
&lt;fantasai> flackr: and you'd have 60 iterations so that it proceeds around the whole clock<br>
&lt;fantasai> flackr: and then iteration-delay would be 1s - animation-duration<br>
&lt;fantasai> TabAtkins: so it would be an additive animation<br>
&lt;fantasai> bramus: we don't have that?<br>
&lt;fantasai> flackr: It's implemented in Blink<br>
&lt;astearns> ack ChrisLilley<br>
&lt;Zakim> ChrisLilley, you wanted to complain a bit<br>
&lt;fantasai> ChrisLilley: When SMIL added animation and SVG added it, we had a professional animator say it's a rubbish spec<br>
&lt;fantasai> ChrisLilley: because it's piecewise linear, which allows simulating a smooth curve<br>
&lt;fantasai> ChrisLilley: if points are changing, you have to do that calculation itself<br>
&lt;fantasai> ChrisLilley: we have easing but still have to precalculate it and don't have a "real animation system"<br>
&lt;fantasai> ChrisLilley: We have an "almost good enough it'll do for now" system<br>
&lt;fantasai> ChrisLilley: But every time we add bits, I die a little more inside.<br>
&lt;kizu> q+<br>
&lt;fantasai> flackr: I think you're arguing in favor of not doing this in steps() and doing iteration compositoin?<br>
&lt;bramus> q+<br>
&lt;fantasai> ChrisLilley: [yes?]<br>
&lt;bramus> scribe+<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to ask about composing easing functions<br>
&lt;bramus> fantasai: do we have or want the ability to compose easing functions by addng them toeghter?<br>
&lt;bramus> … then we could add a ??? with a delay<br>
&lt;bramus> flackr: has come up 1 or 2 times before<br>
&lt;fantasai> fantasai: could add linear + ease + something else or whatever<br>
&lt;fantasai> flackr: we do have animation-wide easing separate from inter-key easing<br>
&lt;ChrisLilley> s/[yes?]/yes<br>
&lt;fantasai> flackr: but more generally composing is sometimes useful<br>
&lt;fantasai> flackr: most common case is making frame-limited animations, where you want a smooth easing functions but only at e.g. 30fps<br>
&lt;fantasai> flackr: So... maybe?<br>
&lt;fantasai> flackr: idk how often it's useful<br>
&lt;astearns> ack kizu<br>
&lt;fantasai> kizu: +1 to being able to achieve this, ideally easier<br>
&lt;fantasai> kizu: If you can work around this with composite animations, that means you need to know how<br>
&lt;fantasai> kizu: it will not be one animation, you'll have to do multiple things<br>
&lt;fantasai> kizu: it will only work for things that are composable, right?<br>
&lt;fantasai> kizu: so you can't animate things that are not composable this way<br>
&lt;fantasai> kizu: I remember I've wanted to do things like this, multiple steps with easing between them<br>
&lt;fantasai> kizu: Unless this really introduces some issues, or we have other things we want to do<br>
&lt;fantasai> kizu: this looks like a very simple thing to use from author perspective<br>
&lt;fantasai> kizu: you can use linear() or bezier() inside<br>
&lt;fantasai> kizu: and it'll just work<br>
&lt;fantasai> kizu: so I think very often in CSS, yeah maybe we should have one wya to do this, but actually different use cases prefer differnet methods<br>
&lt;fantasai> kizu: so I think it's useful to have both compositing and this<br>
&lt;fantasai> flackr: I think what fantasai was getting at was more generally being able to combine easing functions<br>
&lt;fantasai> flackr: I do want to push back that even with iteration composite, it's one iterating animation<br>
&lt;astearns> ack bramus<br>
&lt;fantasai> flackr: you define the clock and then repeat the animation by 60s<br>
&lt;fantasai> bramus: Can ony do iteration compositionin Web Animations, right? Not in CSS?<br>
&lt;fantasai> flackr: not sure, no reason it can't be available in CSS<br>
&lt;bramus> https://github.com/w3c/csswg-drafts/issues/1332#issuecomment-3649356666<br>
&lt;fantasai> bramus: Use cases, other issue where it was mentioned is this one<br>
&lt;fantasai> bramus: using steps() function inside a linear gradient<br>
&lt;fantasai> bramus: so animation approach wouldn't work<br>
&lt;fantasai> astearns: Wonder if we could take out this specific case and work out with composite animations?<br>
&lt;fantasai> astearns: so we could look at the difference between the 2 approaches and whether we want both or one<br>
&lt;fantasai> fantasai: well it wouldn't solve gradients<br>
&lt;fantasai> flackr: making more general than steps<br>
&lt;bramus> fantasai: I think there is some generalizatoins we could to<br>
&lt;bramus> … like being able to string a bunch of easing fns together. some linear, some bezier … not have to try and put it in one function<br>
&lt;bramus> … some bits linear, some bits not<br>
&lt;bramus> … that is a separate feature from here, which is nesting stuff: inside each step do something<br>
&lt;bramus> … we would still need to special case this<br>
&lt;bramus> … if we were doing generatel composabilty, it would be the steps fn, so we would need this nesting structure anyways<br>
&lt;bramus> … idea of taking sth functionally with a set of arguments … now we are expanding that subset of easing fns and turning it into a broader collection of easing fns<br>
&lt;bramus> … natural extension<br>
&lt;bramus> … instead of just step, you can also ease<br>
&lt;bramus> … expanding things<br>
&lt;flackr> q+<br>
&lt;bramus> … doing some kind of composabilty woudl allow more complicated stuff, but doesn tmeasn we should not do this extension<br>
&lt;bramus> … so suggesting to accept this proposal and maybe limit so that you cant recurse … only accept simple easing<br>
&lt;astearns> ack flackr<br>
&lt;fantasai> flackr: Agree we should do this<br>
&lt;fantasai> flackr: Is there a simple way to solve the "only want to use part of the step"<br>
&lt;fantasai> flackr: like, wait and then destination?<br>
&lt;fantasai> TabAtkins: I think answer to that is more general easing combination<br>
&lt;fantasai> TabAtkins: Composite easing with this bit of linear, this bit of ease, and this bit of linear<br>
&lt;fantasai> fantasai: Yeah, exactly<br>
&lt;fantasai> flackr: Ok, then this extends naturally to that in the future<br>
&lt;fantasai> ChrisLilley: Do these need to be absolute or can we do fr units kind of things?<br>
&lt;fantasai> fantasai: Don't easing functions do by default?<br>
&lt;fantasai> TabAtkins: Yeah, they expand to fill space<br>
&lt;fantasai> ChrisLilley: Don't want to paint ourselves into a corner<br>
&lt;fantasai> fantasai: don't think this does<br>
&lt;fantasai> astearns: So let's allow non-steps easing functions as a steps param?<br>
&lt;fantasai> ChrisLilley: single or list?<br>
&lt;fantasai> fantasai: Single. Composability is a separate quesiton, but once we sole it it can be put into here<br>
&lt;fantasai> RESOLVED: Allow simple easing functions as params to steps() as described in the issue<br>
&lt;fantasai> ACTION: Make sure there's an open issue on composing easing functions<br>
</details>


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


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

Received on Wednesday, 28 January 2026 18:50:26 UTC