@@ -432,54 +432,12 @@ Starting of transitions {#starting}
432
432
</span>
433
433
</p>
434
434
435
- <p>
436
- Implementations must also maintain a set of
437
- <dfn export lt="completed transition">completed transitions</dfn> ,
438
- each of which
439
- (like <a>running transitions</a> )
440
- applies to a specific element and non-shorthand property.
441
- <span class="note">
442
- This specification maintains the invariant that
443
- there is never both a <a>running transition</a> and
444
- a <a>completed transition</a> for the same property and element.
445
- </span>
446
- </p>
447
-
448
435
<p>
449
436
If an element is no longer in the document,
450
437
implementations must <a>cancel</a> any <a>running transitions</a>
451
- on it and remove transitions on it from the
452
- <a>completed transitions</a> .
438
+ on that element.
453
439
</p>
454
440
455
- <div class="note">
456
-
457
- <p>
458
- This set of completed transitions
459
- needs to be maintained
460
- in order to prevent
461
- transitions from repeating themselves in certain cases,
462
- i.e., to maintain the invariant
463
- that this specification tries to maintain
464
- that unrelated style changes do not trigger transitions.
465
- </p>
466
-
467
- <p class="example">
468
- An example where maintaining the set of completed transitions
469
- is necessary would be a transition on
470
- an inherited property,
471
- where the parent specifies a transition of that property for
472
- a longer duration (say, ''transition: 4s text-indent'' )
473
- and a child element that inherits the parent's value specifies
474
- a transition of the same property for a shorter duration
475
- (say, ''transition: 1s text-indent'' ).
476
- Without the maintenance of this set of completed transitions,
477
- implementations could start additional transitions on the child
478
- after the initial 1 second transition on the child completes.
479
- </p>
480
-
481
- </div>
482
-
483
441
<p>
484
442
Various things can cause the <a>computed values</a> of properties
485
443
on an element to change.
@@ -540,26 +498,15 @@ Starting of transitions {#starting}
540
498
then transitions are not started for that element
541
499
in that style change event.
542
500
Otherwise,
501
+ define the <dfn export>base style</dfn> as
502
+ the <a>computed values</a> of all properties on the element
503
+ as they would be without any declarations added to the
504
+ "Animation" or "Transition" [[css-cascade-3#cascading-origins|origins]] ,
505
+ inheriting from the base style of the parent;
543
506
define the <dfn export>before-change style</dfn> as
544
- the <a>computed values</a> of all properties on the element as of
545
- the previous <a>style change event</a> ,
546
- except with any styles derived from declarative
547
- animations such as CSS Transitions, CSS Animations
548
- ([[CSS3-ANIMATIONS]] ),
549
- and SMIL Animations ([[SMIL-ANIMATION]] , [[SVG11]] )
550
- updated to the current time.
551
- Likewise, define the <dfn export>after-change style</dfn> as
552
- the <a>computed values</a> of all properties
553
- on the element based on the information
554
- known at the start of that <a>style change event</a> ,
555
- but using the computed values of the 'animation-*' properties from the
556
- <a>before-change style</a> ,
557
- excluding any styles from CSS Transitions in the computation,
558
- and inheriting from
559
- the <a>after-change style</a> of the parent.
560
- Note that this means the <a>after-change style</a> does not differ from
561
- the <a>before-change style</a> due to newly created or canceled CSS
562
- Animations.
507
+ the <a>base style</> as of the previous <a>style change event</a> ; and
508
+ define the <dfn export>after-change style</dfn> as
509
+ the <a>base style</> as of the current <a>style change event</a> .
563
510
</p>
564
511
565
512
<div class="note">
@@ -652,12 +599,6 @@ Starting of transitions {#starting}
652
599
the <a>after-change style</a> for that property,
653
600
and the values for the property are [=transitionable=] ,
654
601
</li>
655
- <li>
656
- the element does not have a <a>completed transition</a>
657
- for the property
658
- or the <a>end value</a> of the <a>completed transition</a>
659
- is different from the <a>after-change style</a> for the property,
660
- </li>
661
602
<li>
662
603
there is a <a>matching transition-property value</a> , and
663
604
</li>
@@ -666,8 +607,6 @@ Starting of transitions {#starting}
666
607
</li>
667
608
</ul>
668
609
then implementations must
669
- remove the <a>completed transition</a> (if present) from the set
670
- of completed transitions and
671
610
start a transition whose:
672
611
<ul>
673
612
<li>
@@ -699,23 +638,11 @@ Starting of transitions {#starting}
699
638
</ul>
700
639
</li>
701
640
<li>
702
- Otherwise,
703
- if the element has a <a>completed transition</a> for the property
704
- and the <a>end value</a> of the <a>completed transition</a>
705
- is different from the <a>after-change style</a> for the property,
706
- then implementations must
707
- remove the <a>completed transition</a> from the set of
708
- <a>completed transitions</a> .
709
- </li>
710
- <li>
711
- If the element has a <a>running transition</a> or
712
- <a>completed transition</a> for the property,
641
+ If the element has a <a>running transition</a> for the property,
713
642
and there is <strong> not</strong>
714
643
a <a>matching transition-property value</a> ,
715
644
then implementations must
716
- <a>cancel</a> the <a>running transition</a>
717
- or remove the <a>completed transition</a> from the set of
718
- <a>completed transitions</a> .
645
+ <a>cancel</a> the <a>running transition</a> .
719
646
</li>
720
647
<li>
721
648
If the element has a <a>running transition</a> for the property,
@@ -1060,15 +987,14 @@ Completion of transitions {#complete}
1060
987
but prior to the first <a>style change event</a>
1061
988
whose time is equal to or after their <a>end time</a> .
1062
989
When a transition completes,
1063
- implementations must move
990
+ implementations must remove
1064
991
all transitions that complete at that time
1065
992
from the set of <a>running transitions</a>
1066
- to the set of <a>completed transitions</a>
1067
993
and then fire the <a href="#transition-events">events</a>
1068
994
for those completions.
1069
995
<span class="note"> (Note that doing otherwise, that is,
1070
- firing some of the events before doing all of the moving
1071
- from <a>running transitions</a> to <a>completed transitions</a> ,
996
+ firing some of the events before removing all completed transitions
997
+ from <a>running transitions</a>
1072
998
could allow
1073
999
a style change event to happen
1074
1000
without the necessary transitions completing,
0 commit comments