-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Animation kicking in only after prerender, causing visual issues #67
Comments
That's strange. My initial guess is it has something to do with the statically generated site being hydrated after the static HTML and CSS renders. Where/when is the animxyz CSS being loaded when the site loads? If you can include it with the rest of the styling CSS that loads with the initial site load, then the elements with If the animxyz CSS is being loaded only when the page hydrates with Vue then that would explain what you are seeing. |
@mattaningram that's basically what I think is also happening. Do you think this is also related to: #38? Thanks in advance! |
I've tried a brand new nuxt project to see if I did something incorrectly, but it looks to me that on statically generated sites it only loads once page hydrates... |
Where in your Nuxt setup is the actual CSS for animxyz being loaded? Ideally you would load the CSS prior to the JS rather than with it. Is it included in the CSS sent to the client pre-hydration? |
Hey @mattaningram thanks for getting back to me! I've tried both manually adding a link to the |
It's definitely in there, if you manually inspect animated elements that have the xyz classes active you can see it set on the Another thing I'm noticing on your site is the xyz classes aren't being removed when the animation is over they way they should be. Probably also related to the static site HTML being hydrated. Hmmm just looked at your |
@mattaningram so I disabled
|
Hey guys,
I'm currently having an issue where on initial render all elements that include the animxyz transition, first appears on intial render, then animxyz kicks in. Is this normal behavior?
You can see an example of this here: https://potpunks.io/home
I would expect it to automatically hide elements on initial render by default, then animate those elements in. Which causes a weird visial issue, where you see elements to begin with then you see it animate once it's loaded. More significant when you're using the fade animation.
I'm currently using nuxt for this project and not really sure if its to do with preloading animxyz first?
Thanks in advance!
The text was updated successfully, but these errors were encountered: