Skip to content

Commit

Permalink
Removes morph animations when setting transition:animate=none
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp committed Feb 27, 2024
1 parent 6bf102a commit 8e861f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-shrimps-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Removes morph animation, too, when setting `transition:animate=none` for view transitions.
1 change: 1 addition & 0 deletions packages/astro/src/runtime/server/transition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export function renderTransition(
sheet.addFallback('old', 'animation: none; mix-blend-mode: normal;');
sheet.addModern('old', 'animation: none; opacity: 0; mix-blend-mode: normal;');
sheet.addAnimationRaw('new', 'animation: none; mix-blend-mode: normal;');
sheet.addModern('group', 'animation: none');
}

result._metadata.extraHead.push(markHTMLString(`<style>${sheet.toString()}</style>`));
Expand Down

0 comments on commit 8e861f0

Please sign in to comment.