Skip to content

Commit 0982b06

Browse files
committed
[css-animations-2] Account for animation-composition when merging keyframes (closes #6935)
1 parent 6181007 commit 0982b06

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

css-animations-2/Overview.bs

+18-6
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ and the position of the animation in |element|'s 'animation-name' list,
259259
repeating the list as necessary as described in
260260
[[CSS-ANIMATIONS-1#animation-name]].
261261
262+
1. Let |default composite| be ''replace''.
263+
262264
1. Find the last ''@keyframes'' at-rule in document order
263265
with <<keyframes-name>> matching |name|.
264266
@@ -285,15 +287,21 @@ and the position of the animation in |element|'s 'animation-name' list,
285287
specified on the keyframe block, or,
286288
if there is no such valid declaration, |default timing function|.
287289
290+
1. Let |keyframe composite| be the value of
291+
the last valid declaration of 'animation-composition'
292+
specified on the keyframe block, or,
293+
if there is no such valid declaration, |default composite|.
294+
288295
1. After converting |keyframe timing function| to its canonical form
289296
(e.g. such that ''step-end'' becomes ''steps(1, end)'')
290297
let |keyframe| refer to the existing keyframe in |keyframes| with
291-
matching keyframe offset and timing function, if any.
298+
matching keyframe offset, timing function and composite, if any.
292299
293300
If there is no such existing keyframe,
294301
let |keyframe| be a new empty keyframe with
295302
offset, |keyframe offset|,
296-
and timing function, |keyframe timing function|,
303+
timing function, |keyframe timing function|,
304+
composite, |keyframe composite|,
297305
and prepend it to |keyframes|.
298306
299307
1. Iterate over all declarations in the keyframe block and
@@ -324,11 +332,13 @@ and the position of the animation in |element|'s 'animation-name' list,
324332
not all of the properties in |animated properties| are present,
325333
326334
1. Let |initial keyframe| be the [=keyframe=] in |keyframes|
327-
with offset 0 and timing function |default timing function|.
335+
with offset 0, timing function |default timing function|
336+
and composite |default composite|.
328337
329338
If there is no such keyframe,
330339
let |initial keyframe| be a new empty keyframe with offset 0,
331-
and timing function |default timing function|,
340+
timing function |default timing function|,
341+
composite |default composite,
332342
and add it to |keyframes| after the last keyframe with offset 0.
333343
334344
1. For each property in |animated properties| that is not present
@@ -341,11 +351,13 @@ and the position of the animation in |element|'s 'animation-name' list,
341351
not all of the properties in |animated properties| are present,
342352
343353
1. Let |final keyframe| be the [=keyframe=] in |keyframes|
344-
with offset 1 and timing function |default timing function|.
354+
with offset 1, timing function |default timing function|
355+
and composite |default composite|.
345356
346357
If there is no such keyframe,
347358
let |final keyframe| be a new empty keyframe with offset 1,
348-
and timing function |default timing function|,
359+
timing function |default timing function|
360+
and composite |default composite|,
349361
and add it to |keyframes| after the last keyframe with offset 1.
350362
351363
1. For each property in |animated properties| that is not present

0 commit comments

Comments
 (0)