diff --git a/css-view-transitions-2/Overview.bs b/css-view-transitions-2/Overview.bs
index 725bca51043..2f6aa0e79ac 100644
--- a/css-view-transitions-2/Overview.bs
+++ b/css-view-transitions-2/Overview.bs
@@ -118,7 +118,7 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
1. Once it's time to [=unload=] the old document, if the navigation is [=same origin=]
and the old {{Document}} has opted in to cross-document view-transitions, the old state is captured.
- 1. An event named {{PageRevealEvent|reveal}} is fired on the new {{Document}}, with a `viewTransition` property,
+ 1. An event named {{RevealEvent|reveal}} is fired on the new {{Document}}, with a `viewTransition` property,
which is a {{ViewTransition}} object. This {{ViewTransition}}'s {{ViewTransition/updateCallbackDone}}
is already resolved,
and its [=captured elements=] are populated from the old {{Document}}.
@@ -133,12 +133,12 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
To generate the same cross-fade as in the first example [[css-view-transitions-1#examples]],
but across documents, we don't need JavaScript.
- Instead, we opt in to auto-view-transitions in both page 1 and page 2:
+ Instead, we opt in to triggering view-transitions on navigation in both page 1 and page 2:
```css
// in both documents:
- @auto-view-transitions {
- same-origin: enable;
+ @view-transition same-origin {
+ trigger: navigation;
}
```
@@ -151,14 +151,14 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
To achieve the effect in [[css-view-transitions-1#examples|example 5]], we have to do several
things:
- - Opt-in to auto-view-transitions in both pages.
+ - Opt-in to navigation-triggered view-transitions in both pages.
- Pass the click location to the new document, e.g. via {{WindowSessionStorage/sessionStorage}}.
- - Intercept the {{ViewTransition}} object in the new document, using the {{PageRevealEvent|reveal event}}.
+ - Intercept the {{ViewTransition}} object in the new document, using the {{RevealEvent}}.
In both pages:
```css
- @auto-view-transitions {
- same-origin: enable;
+ @view-transition same-origin {
+ trigger: navigation;
}
```
@@ -259,59 +259,68 @@ document.startViewTransition({update: updateTheDOMSomehow});
# CSS rules # {#css-rules}
-## The ''@auto-view-transition'' rule ## {#auto-view-transition-rule}
+## The ''@view-transition'' rule ## {#view-transition-rule}
-The ''@auto-view-transition'' rule is used by a document to indicate that cross-document navigations
+The ''@view-transition'' rule is used by a document to indicate that cross-document navigations
should setup and activate a {{ViewTransition}}. To take effect, it must be present in the old document
-when unloading, and in the new document when it is being [=reveal document|revealed=].
+when unloading, and in the new document when it is [=ready to render=].
-## @auto-view-transition rule grammar ## {#auto-view-transition-grammer}
+## @view-transition rule grammar ## {#view-transition-grammar}
-''@auto-view-transition'' rules are [=CSS/parsed=] according to the following grammar,
-plus the additional rules noted below:
+The ''@view-transition'' rule has the following syntax:
- @auto-view-transition = @auto-view-transition { <-## The [=@auto-view-transition/same-origin=] property ## {#view-transition-name-prop} +Note: currently> } + @view-transition same-origin { + < > + }
same-origin
has to be present, as a future placeholder for customizing
+the navigation behavior based on the URL.
+
+Note: as per default behavior, the ''@view-transition'' rule can be nested inside a
+[=conditional group rule=] such as ''@media'' or ''@supports''.
+
+## The [=@view-transition/view-transition=] property ## {#view-transition-name-prop}
- Name: same-origin - For: @auto-view-transition - Value: enabled | disabled - Initial: disabled + Name: trigger + For: @view-transition + Value: navigation | none + Initial: none- The 'same-origin' property opts in to automatically performing a view transition when performing a [=same origin=] navigation. + The 'trigger' property opts in to automatically starting a view transition when performing a navigation. It needs to be enabled both in the old document (when unloading) and in the new document (when ready to render). -
CSSRule
interface ## {#extensions-to-cssrule-interface}
+
+The CSSRule
interface is extended as follows:
+
++partial interface CSSRule { + const unsigned short VIEW_TRANSITION_RULE = 15; +}; ++ +## The
CSSViewTransitionRule
interface ## {#navgation-behavior-rule-interface}
+
+The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
+
+reveal
on |document|'s [=relevant global object=],
- using {{PageRevealEvent}}.
+ using {{RevealEvent}}.
1. If |transition| is not null, then [=activate view transition|activate=] |transition|.
- 1. Set |document|'s [=document/is revealed=] to true.
+ 1. Set |document|'s [=document/ready to render fired=] to true.
enabled
.
+ if the [=computed value=] of trigger
+ for |document| is navigation
.