Skip to content

Commit 36962d6

Browse files
committed
Define adding the ::view-transition
1 parent 7c87af6 commit 36962d6

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

css-view-transitions-1/Overview.bs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
259259
a [=pseudo-element parent=].
260260
Its [=originating element=] is the document's [=document element=].
261261

262+
Its [=containing block=] is the [=snapshot viewport=].
263+
262264
The following is added to the [=HTML user agent style sheet=]:
263265

264266
```css
@@ -422,8 +424,6 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
422424

423425
- The [=view-transition layer=] paints after the stacking context for the [=document element=] and [=top layer=].
424426

425-
- The [=view-transition layer=]'s [=containing block=] is the [=snapshot viewport=].
426-
427427
Note: The intent of the feature is to be able to capture the contents of the page, which includes the top layer elements.
428428
In order to accomplish that, the [=view-transition layer=] cannot be a part of the captured top layer context,
429429
since that results in a circular dependency.
@@ -500,6 +500,16 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
500500
Note: This is used to hold dynamic styles relating to transitions.
501501
</dl>
502502

503+
## Additions to [=document element=] ## {#additions-to-document-element}
504+
505+
A [=document element=] additionally has a <dfn for="document element">view-transition root pseudo-element</dfn>.
506+
A ''::view-transition'' or null. Initially null.
507+
508+
When this is a ''::view-transition'', the ''::view-transition'' renders as a child of the [=document element=],
509+
and the [=document element=] is its [=originating element=].
510+
511+
Note: The position of the ''::view-transition'' within the [=document element=] does not matter, as the ''::view-transition'''s [=containing block=] is the [=snapshot viewport=].
512+
503513
# API # {#api}
504514

505515
## Additions to {{Document}} ## {#additions-to-document-api}
@@ -1054,7 +1064,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
10541064

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

1057-
1. [=list/Append=] |transition|'s [=ViewTransition/transition root pseudo-element=] to this |document|'s [=snapshot viewport=]'s [=pseudo-element parent/children=].
1067+
1. Set |document|'s [=document element=]'s [=view-transition root pseudo-element=] to |transition|'s [=ViewTransition/transition root pseudo-element=].
10581068

10591069
1. [=map/For each=] |transitionName| → |capturedElement| of |transition|'s [=ViewTransition/named elements=]:
10601070

@@ -1281,8 +1291,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;
12811291

12821292
1. Let |document| be |transition|'s [=relevant global object's=] [=associated document=].
12831293

1284-
1. [=list/Remove=] |transition|'s [=ViewTransition/transition root pseudo-element=]
1285-
from |document|'s [=snapshot viewport=]'s [=pseudo-element parent/children=].
1294+
1. Set |document|'s [=document element=]'s [=view-transition root pseudo-element=] to null.
12861295

12871296
1. [=list/For each=] |capturedElement| of |transition|'s [=ViewTransition/named elements=]' [=map/values=]:
12881297

0 commit comments

Comments
 (0)