Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

fix: View Transitions API: Show me keeps the posed pictures under reduced motion, and the reduced-motion Compare note matches its still

matinb5639fc92e9a
diff --git a/animations/03-page-transitions/view-transitions-api/index.html b/animations/03-page-transitions/view-transitions-api/index.html
index 15a2067e..03cb2358 100644
--- a/animations/03-page-transitions/view-transitions-api/index.html
+++ b/animations/03-page-transitions/view-transitions-api/index.html
@@ -318,7 +318,7 @@
// Under reduced motion both views are still pictures, and their notes say so
if(!motionOk){
document.querySelector('[data-hb-for="inside"]').textContent="Shown still, a drawing of the browser's work: pictures of the old and new page caught part way, over the page, which has already switched.";
- document.querySelector('[data-hb-for="compare"]').textContent='Shown still: Switches at once has simply changed page; Browser animates it is caught part way between pictures of the old and the new page.';
+ document.querySelector('[data-hb-for="compare"]').textContent='Shown still: Switches at once simply changes page; Browser animates it is caught part way between pictures of the old and the new page.';
}
// Drops a timer's id once it fires, so `timers` only holds the ones still waiting.
@@ -450,7 +450,7 @@
// At rest in See inside and Compare the pictures are held part way through the last change, which ended on the page on show
function pose(){
if(fake)return;
- if(mode==='normal'||animating||wayBack){lift();return}
+ if(mode==='normal'||animating||(wayBack&&motionOk)){lift();return}
const c=last&&last.to===current?last:{from:(current+1)%PAGES.length,to:current};
stage.classList.add('posed');
if(c.from+'-'+c.to!==posedKey){setPics(c.from,c.to,true);posedKey=c.from+'-'+c.to}