From 8e861f02f8d6a647009aad5b78c8549bd8f5b0e2 Mon Sep 17 00:00:00 2001
From: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Date: Tue, 27 Feb 2024 15:07:25 +0100
Subject: [PATCH 1/2] Removes morph animations when setting
transition:animate=none
---
.changeset/eight-shrimps-enjoy.md | 5 +++++
packages/astro/src/runtime/server/transition.ts | 1 +
2 files changed, 6 insertions(+)
create mode 100644 .changeset/eight-shrimps-enjoy.md
diff --git a/.changeset/eight-shrimps-enjoy.md b/.changeset/eight-shrimps-enjoy.md
new file mode 100644
index 000000000000..e41627b3779c
--- /dev/null
+++ b/.changeset/eight-shrimps-enjoy.md
@@ -0,0 +1,5 @@
+---
+"astro": patch
+---
+
+Removes morph animation, too, when setting `transition:animate=none` for view transitions.
diff --git a/packages/astro/src/runtime/server/transition.ts b/packages/astro/src/runtime/server/transition.ts
index 755e64417ac2..0c402fb27cdf 100644
--- a/packages/astro/src/runtime/server/transition.ts
+++ b/packages/astro/src/runtime/server/transition.ts
@@ -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(``));
From c03fd162c53a04a6d26e54aa14c23ffcadfa00e9 Mon Sep 17 00:00:00 2001
From: Arsh <69170106+lilnasy@users.noreply.github.com>
Date: Tue, 27 Feb 2024 22:46:01 +0530
Subject: [PATCH 2/2] Apply suggestions from code review
---
.changeset/eight-shrimps-enjoy.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.changeset/eight-shrimps-enjoy.md b/.changeset/eight-shrimps-enjoy.md
index e41627b3779c..a56edf543021 100644
--- a/.changeset/eight-shrimps-enjoy.md
+++ b/.changeset/eight-shrimps-enjoy.md
@@ -2,4 +2,4 @@
"astro": patch
---
-Removes morph animation, too, when setting `transition:animate=none` for view transitions.
+Fixes an issue where `` still allowed the browser-native morph animation.