Skip to content

Commit 00c780f

Browse files
committed
[css-timing] Fix behavior of step timing functions at boundaries
1 parent c0bda7c commit 00c780f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

css-timing/Overview.bs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,31 @@ and [=before flag=] as follows:
248248

249249
decrement <var>current step</var> by one.
250250

251+
1. If [=input progress value=] &ge; 0 and <var>current step</var> &lt; 0,
252+
let <var>current step</var> be zero.
253+
254+
1. If [=input progress value=] &le; 1 and <var>current step</var> &gt;
255+
[=steps=], let <var>current step</var> be [=steps=].
256+
257+
<div class=note>
258+
259+
Steps 4 and 5 in this procedure ensure that given an [=input progress
260+
value=] in the range [0, 1], a step timing function does not produce an
261+
[=output progress value=] outside that range.
262+
263+
For example, although mathematically we might expect that a step timing
264+
function with a [=step position=] of <a value for="steps()">start</a>
265+
would step up when the [=input progress value=] is 1, intuitively, when we
266+
apply such a timing function to a forwards-filling animation, we expect
267+
it to produce an [=output progress value=] of 1 as the animation fills
268+
forwards.
269+
270+
A similar situation arises for a step timing function with a [=step
271+
position=] of <a value for="steps()">end</a> when applied to an animation
272+
during its delay phase.
273+
274+
</div>
275+
251276
1. The [=output progress value=] is <code><var>current step</var>
252277
/ [=steps=]</code>.
253278

0 commit comments

Comments
 (0)