From 65cc54bc9a1599e1c97a1661c3492893b5eab8dd Mon Sep 17 00:00:00 2001 From: jakearchibald Date: Wed, 16 Nov 2022 13:24:42 +0000 Subject: [PATCH 1/9] tmp --- css-view-transitions-1/Overview.bs | 44 ++++++++++-------------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index ad702986e7d..af653835be5 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -178,6 +178,20 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface; This may be confusing, since the elements themselves are not necessarily referring to the same object, but it is a useful model to consider them to be visual states of the same conceptual page entity, that we happen to call "element". +# User-agent keyframes # {#ua-keyframes} + + The following <<@keyframes>> are added to the [=user-agent origin=]: + + ```css + @keyframes -ua-view-transition-fade-out { + to { opacity: 0; } + } + + @keyframes -ua-view-transition-fade-in { + from { opacity: 0; } + } + ``` + # Pseudo-elements # {#pseudo} While the UA is [=animating a view transition=], @@ -992,36 +1006,6 @@ urlPrefix: https://wicg.github.io/navigation-api/; type: interface;
To animate a view transition given a {{ViewTransition}} |transition|: - 1. Generate a <<@keyframes>> named "-ua-view-transition-fade-out" in - [=user-agent origin=] as follows: - - ```css - @keyframes -ua-view-transition-fade-out { - to { opacity: 0; } - } - ``` - - 1. Generate a <<@keyframes>> named "-ua-view-transition-fade-in" in - [=user-agent origin=] as follows: - - ```css - @keyframes -ua-view-transition-fade-in { - from { opacity: 0; } - } - ``` - - 1. Apply the following styles in [=user-agent origin=]: - - ```css - html::view-transition-old(*) { - animation: -ua-view-transition-fade-out 0.25s both; - } - - html::view-transition-new(*) { - animation: -ua-view-transition-fade-in 0.25s both; - } - ``` - 1. [=map/For each=] |name| → |capturedElement| of |transition|'s [=ViewTransition/named elements=]: 1. If neither of |capturedElement|'s [=captured element/old image=] or [=captured element/new element=] is null: From 8152680ea2267ca3ae245f75b84a071933caf6d5 Mon Sep 17 00:00:00 2001 From: jakearchibald Date: Wed, 16 Nov 2022 15:33:20 +0000 Subject: [PATCH 2/9] Set up UA styles --- css-view-transitions-1/Overview.bs | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/css-view-transitions-1/Overview.bs b/css-view-transitions-1/Overview.bs index af653835be5..49b64804f9c 100644 --- a/css-view-transitions-1/Overview.bs +++ b/css-view-transitions-1/Overview.bs @@ -30,6 +30,8 @@ spec:css-images-4; type:function; text:element() urlPrefix: https://wicg.github.io/navigation-api/; type: interface; text: NavigateEvent text: signal; for: NavigateEvent; url: #ref-for-dom-navigateevent-signal① +urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn; + text: HTML user agent style sheet; url: #the-css-user-agent-style-sheet-and-presentational-hints