@@ -337,24 +337,24 @@ its associated [=keyframes=] are generated as follows:
337337
3383381. <strong>Generate Initial and Final Frames:</strong>
339339
340- 1. Create two new [=keyframes=], |initial keyframe| and |final keyframe|,
341- assigning each |default timing function| as its |keyframe timing function|
340+ 1. Find or create the |initial keyframe|,
341+ a [=keyframe=] with a |keyframe offset| of '' 0%'',
342+ |default timing function| as its |keyframe timing function|,
342343 and |default composite| as its |keyframe composite|.
343344
344- 1. Give |initial keyframe| a |keyframe offset| of zero ('' 0%'')
345- and prepend it to |keyframes|;
346- give |final keyframe| a |keyframe offset| of one ('' 100%'')
347- and append it to |keyframes|.
348-
349- 1. Add to the |keyframe properties| of |initial keyframe| and |final keyframe|
350- the [=computed value=] on |element|
351- of each property in |animated properties|.
352- Skip any property already declared by a [=keyframe=] in |keyframes|
353- that has a matching |keyframe offset|
354- or that is positioned
355- earlier (for |initial keyframe|)
356- or later (for |final keyframe|)
357- in the [=used keyframe order=].
345+ 1. For any property in |animated properties|
346+ that is not otherwise present in a keyframe with an offset of '' 0%''
347+ or one that would be positioned earlier in the [=used keyframe order=],
348+ add the [=computed value=] of that property on |element|
349+ to |initial keyframe|’s |keyframe values|.
350+
351+ 1. If |initial keyframe|’s |keyframe values| is not empty,
352+ prepend |initial keyframe| to |keyframes|.
353+
354+ 1. Repeat for |final keyframe|,
355+ using an offset of '' 100%'',
356+ considering keyframes positioned <em>later</em> in the [=used keyframe order=],
357+ and <em>appending</em> to |keyframes|.
358358
3593591. <strong>Sort Frames:</strong>
360360
0 commit comments