Skip to content

Commit 227b73a

Browse files
ScopedVT: Update Introduction. (w3c#13023)
1 parent e6465bb commit 227b73a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

css-view-transitions-2/Overview.bs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ spec:css2; type:dfn; text:viewport
115115
This specification introduces a DOM API and associated CSS features
116116
that allow developers to create animated visual transitions,
117117
called <dfn export>view transitions</dfn>
118-
between different states of a [=/document=],
118+
between different states of a [=/document=] or an [=/element=],
119119
or between distinct same-origin documents.
120120

121121
## Level 2 Updates ## {#intro-l2}
@@ -129,6 +129,7 @@ spec:css2; type:dfn; text:viewport
129129
and more specifically based on the active view transition being of a certain type.
130130
* [[#shared-style-with-vt-classes|Sharing styles between view transition pseudo-elements]], a way to declare a style once,
131131
and use it for multiple view transition pseudo-elements. This includes the 'view-transition-class' property, and [[#pseudo-element-class-additions|additions to named pseudo-elements]]
132+
* [[#scoped-vt|Scoped view transitions]], a way to perform view transitions within the scope of a DOM subtree.
132133

133134
## Separating Visual Transitions from DOM Updates ## {#separating-transitions}
134135

@@ -155,10 +156,12 @@ spec:css2; type:dfn; text:viewport
155156

156157
## View Transition Customization ## {#customizing}
157158

158-
By default, <code>document.{{Document/startViewTransition()}}</code>
159-
creates a [=view transition=] consisting of
160-
a page-wide cross-fade between the two DOM states.
161-
Developers can also choose which elements are captured independently
159+
By default, <code>element.{{Element/startViewTransition()}}</code>
160+
and <code>document.{{Document/startViewTransition()}}</code>
161+
create a [=view transition=] consisting of a cross-fade of the entire
162+
[=ViewTransition/root element=] between the two DOM states.
163+
164+
Developers can instead choose which descendant elements are captured independently
162165
using the 'view-transition-name' CSS property,
163166
allowing these to be animated independently of the rest of the page.
164167
Since the transitional state (where both old and new visual captures exist)
@@ -171,12 +174,13 @@ spec:css2; type:dfn; text:viewport
171174

172175
A successful [=view transition=] goes through the following phases:
173176

174-
1. Developer calls <code>document.{{Document/startViewTransition}}({{ViewTransitionUpdateCallback|updateCallback}})</code>,
177+
1. Developer calls <code>document.{{Document/startViewTransition}}({{ViewTransitionUpdateCallback|updateCallback}})</code>
178+
or <code>element.{{Element/startViewTransition}}({{ViewTransitionUpdateCallback|updateCallback}})</code>,
175179
which returns a {{ViewTransition}}, <var>viewTransition</var>.
176180

177181
1. Current state captured as the “old” state.
178182

179-
1. Rendering paused.
183+
1. Rendering paused within the [=ViewTransition/root element=].
180184

181185
1. Developer's {{ViewTransitionUpdateCallback|updateCallback}} function, if provided, is called,
182186
which updates the document state.

0 commit comments

Comments
 (0)