mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
Removes morph animations when setting transition:animate=none (#10247)
* Removes morph animations when setting transition:animate=none * Apply suggestions from code review --------- Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
This commit is contained in:
parent
08cdd0919d
commit
fb773c9161
2 changed files with 6 additions and 0 deletions
5
.changeset/eight-shrimps-enjoy.md
Normal file
5
.changeset/eight-shrimps-enjoy.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Fixes an issue where `<ViewTransitions transition:animate="none" />` still allowed the browser-native morph animation.
|
|
@ -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>`));
|
||||
|
|
Loading…
Reference in a new issue