Skip to content
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

pages revealed before transition completes #11

Closed
jayraydon opened this issue Jun 3, 2018 · 4 comments
Closed

pages revealed before transition completes #11

jayraydon opened this issue Jun 3, 2018 · 4 comments

Comments

@jayraydon
Copy link

maybe I'm understanding the use case incorrectly, but should the css animation always complete before it reveals the new page?

for me, especially when the pages are cached, the css transitions are completely skipped.

great work btw, a pleasure to use so far

@jayraydon jayraydon changed the title pags revealed before transition completes pages revealed before transition completes Jun 3, 2018
@gmrchk
Copy link
Member

gmrchk commented Jun 4, 2018

Thanks!

Yes, the animations should always complete before the new page is revealed. It's possible you have an older version, where swup had a bug and the end of the transition of elements inside of your animated element was detected as the end of transition of the parent element. The latest version does not have this issue.

In case that update doesn't help, please provide your code or demo.

@carlfmichel
Copy link

carlfmichel commented Jun 20, 2018

Was there any resolution to this issue? I am having a similar problem. The transition works the first time but after the page is cached the transition is ignored. Any insight would be great!

I second the compliment, Swup is great!.

@gmrchk
Copy link
Member

gmrchk commented Jun 21, 2018

Thank you!

From my experience, those symptoms indicate that it's not swup issue and you are most likely making mistake somewhere in you code. Unfortunatelly, that means I cannot help you without seeing your code or demo.

Can you please provide that?

@gmrchk
Copy link
Member

gmrchk commented Jul 10, 2018

I've seen people making several mistakes when getting this kind of behavior:

  1. Using CSS @keyframes + animation property, instead of transition property + defining different styles in the transition state. CSS animation can be used for animating elements in the transition, but it cannot be used for swup's timing.

  2. Using [class^="a-"] selector wrong. The selector selects any element whose class attribute begins with string 'a-'... in short, class a-class and-other is selected, but class and-other a-class is not.

  3. Not having the same structure on each page - missing elements for swup to replace in certain pages.

Hope this helps. Closing. Feel free to reopen with demo/code example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants