Skip to content

Commit 1b72d6a

Browse files
committed
[css-transitions] Have clearer wording about elements not in the document, rather than trying to define them as not having computed style.
1 parent 4be8758 commit 1b72d6a

2 files changed

Lines changed: 25 additions & 10 deletions

File tree

css-transitions/Overview.bs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,13 @@ url: http://w3c.github.io/dom/#constructing-events; type: dfn; text: event const
533533
</span>
534534
</p>
535535

536+
<p>
537+
If an element is no longer in the document,
538+
implementations must remove transitions on it
539+
from the <a>running transitions</a> and the
540+
<a>completed transitions</a>.
541+
</p>
542+
536543
<div class="note">
537544

538545
<p>
@@ -564,9 +571,6 @@ url: http://w3c.github.io/dom/#constructing-events; type: dfn; text: event const
564571
<p>
565572
Various things can cause the computed style of an element to change,
566573
or for an element to start or stop having computed style.
567-
(For the purposes of this specification,
568-
an element has computed style when it is in the document tree,
569-
and does not have computed style when it is not in the document tree.)
570574
These include
571575
insertion and removal of elements from the document tree
572576
(which both changes whether those elements have computed styles and
@@ -587,6 +591,8 @@ url: http://w3c.github.io/dom/#constructing-events; type: dfn; text: event const
587591
However,
588592
when an implementation updates the computed style for an element
589593
to reflect one of these changes,
594+
or computes the computed style for an element
595+
newly added to the document,
590596
it must update the computed style for all elements to reflect all
591597
of these changes at the same time
592598
(or at least it must be undetectable that it was done at a
@@ -614,8 +620,9 @@ url: http://w3c.github.io/dom/#constructing-events; type: dfn; text: event const
614620
When a <a>style change event</a> occurs,
615621
implementations must start transitions based on
616622
the computed styles that changed in that event.
617-
If an element does not have a computed style
618-
either before or after the style change event,
623+
If an element is not in the document during that
624+
style change even or was not in the document during
625+
the previous style change event,
619626
then transitions are not started for that element
620627
in that style change event.
621628
Otherwise,

css-transitions/Overview.html

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,14 @@ <h2 class="heading settled" data-level="3" id="starting"><span class="secno">3.
917917
</p>
918918

919919

920+
<p>
921+
If an element is no longer in the document,
922+
implementations must remove transitions on it
923+
from the <a data-link-type="dfn" href="#running-transition">running transitions</a> and the
924+
<a data-link-type="dfn" href="#completed-transition">completed transitions</a>.
925+
</p>
926+
927+
920928
<div class="note" role="note">
921929

922930

@@ -954,9 +962,6 @@ <h2 class="heading settled" data-level="3" id="starting"><span class="secno">3.
954962
<p>
955963
Various things can cause the computed style of an element to change,
956964
or for an element to start or stop having computed style.
957-
(For the purposes of this specification,
958-
an element has computed style when it is in the document tree,
959-
and does not have computed style when it is not in the document tree.)
960965
These include
961966
insertion and removal of elements from the document tree
962967
(which both changes whether those elements have computed styles and
@@ -977,6 +982,8 @@ <h2 class="heading settled" data-level="3" id="starting"><span class="secno">3.
977982
However,
978983
when an implementation updates the computed style for an element
979984
to reflect one of these changes,
985+
or computes the computed style for an element
986+
newly added to the document,
980987
it must update the computed style for all elements to reflect all
981988
of these changes at the same time
982989
(or at least it must be undetectable that it was done at a
@@ -1006,8 +1013,9 @@ <h2 class="heading settled" data-level="3" id="starting"><span class="secno">3.
10061013
When a <a data-link-type="dfn" href="#style-change-event">style change event</a> occurs,
10071014
implementations must start transitions based on
10081015
the computed styles that changed in that event.
1009-
If an element does not have a computed style
1010-
either before or after the style change event,
1016+
If an element is not in the document during that
1017+
style change even or was not in the document during
1018+
the previous style change event,
10111019
then transitions are not started for that element
10121020
in that style change event.
10131021
Otherwise,

0 commit comments

Comments
 (0)