-
Describe your problem 🧐HI there, Configuration: `I have set up Swup with the following configuration:
CSS Used: The CSS for page transitions is as follows:
On mobile devices, for the first-time visit to the site when no pages are cached, the transition animation behaves unexpectedly. Specifically, after navigating from the homepage to another page, the transition overlay performs normally, but once it fades out, the homepage remains visible for an additional half a second to a second before abruptly switching to the new page. This delay disrupts the smoothness of the transition. Notably, this issue does not occur on subsequent visits when the pages are cached, where the transitions work as intended. 77e657a6-643d-4e77-acdb-be1d6a19faa1.mp4What is your question? 🙋♀️I would appreciate any insights or guidance on resolving this issue. Could this be a problem with Swup's handling of transitions on uncached pages, or is there an adjustment needed in my configuration or CSS? What I don't understand is that the " html.is-rendering" class should only be applied when the content has been replaced so I don't it why the old main element is visible after the transition.... Thanks in advance for your help ! URL to minimal reproduction 🔗Don't have it yet Checked all these? 📚
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 13 replies
-
Hi @kooalab ! I'd try two things:
html.is-animating .transition-overlay {
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
background-color: rgba(7, 8, 11, 1);
}
|
Beta Was this translation helpful? Give feedback.
-
I have a feeling this has to do with the CSS transition defined on the overlay. Can you try this CSS based on the official overlay demo? .transition-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
background-color: rgba(7, 8, 11, 1);
opacity: 0;
transform: translate3d(0, -100%, 0);
pointer-events: none;
}
html.is-changing .transition-overlay {
transition: transform 400ms ease-in-out;
opacity: 1;
}
html.is-animating .transition-overlay {
transform: translate3d(0, 0, 0);
}
html.is-rendering .transition-overlay {
transform: translate3d(0, 100%, 0);
} |
Beta Was this translation helpful? Give feedback.
-
@kooalab I can confirm that this is a bug with swup itself. I've created a PR with a fix in #858 |
Beta Was this translation helpful? Give feedback.
-
@kooalab this should be fixed in 4.5.1. Could you check it out and report back? Thank you! |
Beta Was this translation helpful? Give feedback.
@kooalab this should be fixed in 4.5.1. Could you check it out and report back? Thank you!