Skip to content

Commit 828c146

Browse files
committed
[css-view-transition-1] Simplify handling of ::view-transition
1 parent 3d3143f commit 828c146

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
676676
Its [=originating element=] is the document's [=document element=],
677677
and its [=containing block=] is the [=snapshot containing block=].
678678

679+
This element is only rendered when it has children.
680+
679681
Note: This element serves as the [=tree/parent=] of all ''::view-transition-group()'' pseudo-elements.
680682

683+
Note: The position of this element within the [=document element=] does not matter, as its [=containing block=] is the [=snapshot containing block=].
684+
681685
### View Transition Named Subtree Root: the ''::view-transition-group()'' pseudo-element ### {#::view-transition-group}
682686

683687
The <dfn>::view-transition-group()</dfn> [=pseudo-element=]
@@ -820,7 +824,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
820824
When a {{Document}}'s [=document/active view transition=]'s [=ViewTransition/phase=] is "`animating`",
821825
the boxes generated by any element in that {{Document}} with [=captured in a view transition=]
822826
and its [=element contents=],
823-
except [=ViewTransition/transition root pseudo-element=]'s [=tree/inclusive descendants=],
827+
except the [=tree/inclusive descendants=] of the ''::view-transition'' [=pseudo-element=] on that {{Document}}'s [=document element=],
824828
are not painted (as if they had ''visibility: hidden'') and
825829
do not respond to hit-testing (as if they had ''pointer-events: none'').
826830

@@ -1082,10 +1086,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
10821086
Note: This is [=marked as handled=] to prevent duplicate {{unhandledrejection}}s,
10831087
as this promise only ever rejects along with the [=update callback done promise=].
10841088

1085-
: <dfn>transition root pseudo-element</dfn>
1086-
:: a ''::view-transition''.
1087-
Initially a new ''::view-transition''.
1088-
10891089
: <dfn>initial snapshot containing block size</dfn>
10901090
:: a [=tuple=] of two numbers (width and height), or null.
10911091
Initially null.
@@ -1137,14 +1137,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
11371137
Initially a new [=/style sheet=] in the [=user-agent origin=], ordered after the [=global view transition user agent style sheet=].
11381138

11391139
Note: This is used to hold dynamic styles relating to transitions.
1140-
1141-
: <dfn>show view transition tree</dfn>
1142-
:: A boolean. Initially false.
1143-
1144-
When this is true, [=this=]'s [=active view transition=]'s [=ViewTransition/transition root pseudo-element=] renders as a child of [=this=]'s [=document element=],
1145-
with [=this=]'s [=document element=] is its [=originating element=].
1146-
1147-
Note: The position of the [=ViewTransition/transition root pseudo-element=] within the [=document element=] does not matter, as the [=ViewTransition/transition root pseudo-element=]'s [=containing block=] is the [=snapshot containing block=].
11481140
</dl>
11491141

11501142
### Additions to Elements ### {#elements-concept}
@@ -1441,14 +1433,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
14411433

14421434
1. Let |document| be [=this's=] [=relevant global object's=] [=associated document=].
14431435

1444-
1. Set |document|'s [=show view transition tree=] to true.
1445-
14461436
1. [=map/For each=] |transitionName| → |capturedElement| of |transition|'s [=ViewTransition/named elements=]:
14471437

14481438
1. Let |group| be a new ''::view-transition-group()'',
14491439
with its [=view transition name=] set to |transitionName|.
14501440

1451-
1. Append |group| to |transition|'s [=ViewTransition/transition root pseudo-element=].
1441+
1. Append |group| to the ''::view-transition'' [=pseudo-element=] on |document|'s [=document element=].
14521442

14531443
1. Let |imagePair| be a new ''::view-transition-image-pair()'',
14541444
with its [=view transition name=] set to |transitionName|.
@@ -1773,7 +1763,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
17731763

17741764
1. Let |hasActiveAnimations| be a boolean, initially false.
17751765

1776-
1. [=list/For each=] |element| of |transition|'s [=ViewTransition/transition root pseudo-element=]'s [=tree/inclusive descendants=]:
1766+
1. [=list/For each=] |element| of the [=tree/inclusive descendants=] of the ''::view-transition'' [=pseudo-element=] on |document|'s [=document element=]:
17771767
1. For each |animation| whose [=timeline=] is a [=document timeline=] associated with |document|,
17781768
and contains at least one [=animation/associated effect=] whose [=effect target=] is |element|,
17791769
set |hasActiveAnimations| to true if any of the following conditions is true:
@@ -1918,7 +1908,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
19181908
and |style| is in |document|'s [=document/dynamic view transition style sheet=],
19191909
then remove |style| from |document|'s [=document/dynamic view transition style sheet=].
19201910

1921-
1. Set |document|'s [=document/show view transition tree=] to false.
1911+
1. Remove all children of the ''::view-transition'' [=pseudo-element=] on |document|'s [=document element=].
19221912

19231913
1. Set |document|'s [=document/active view transition=] to null.
19241914
</div>

0 commit comments

Comments
 (0)