Replies: 2 comments 6 replies
-
In my experience, this is a limitation of the builtin transitions. I fixed it by modifying them -- for example, for function flyfix(node, { delay = 0, duration = 400, easing: easing$1 = cubicOut, x = 0, y = 0, opacity = 0 } = {}) {
const style = getComputedStyle(node);
const target_opacity = +style.opacity;
const transform = style.transform === 'none' ? '' : style.transform;
-> node.style.opacity = opacity // this line fixes it by applying the opacity (default 0) right away
node.addEventListener('introend', () => {
node.style.opacity = style.opacity
}, {once: true})
const od = target_opacity * (1 - opacity);
return {
delay,
duration,
easing: easing$1,
css: (t, u) => `
transform: ${transform} translate3D(${(1 - t) * x}px, ${(.99 - t) * y}px, 0);
opacity: ${target_opacity - (od * u)};
`
}
}; That same fix should work for all of the transitions. |
Beta Was this translation helpful? Give feedback.
1 reply
-
you need to use |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What's the best way to assure proper fade transition between pages on SvelteKit?
But the issue is when you first click on a page the new page content immediately appears > fades out > fades back in.
Anyway to achieve something truly like Vue's out-in?
Beta Was this translation helpful? Give feedback.
All reactions