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

How to increase animation-duration for default opacity / transform animation? #155

Closed
powerbuoy opened this issue May 25, 2022 · 2 comments

Comments

@powerbuoy
Copy link

powerbuoy commented May 25, 2022

Loving this new API! I tried it out as soon as I heard about it and it's really cool, but I was trying to increase the default transform / opacity animation duration so I tried this bit of code here:

::page-transition-outgoing-image(post-background),
::page-transition-incoming-image(post-background) {
	animation-duration: 10s;
}

And while this does increase the duration of the opacity change, the transform is still the same speed as before.

What am I doing wrong?

You can view my full demo here: https://sleekwp.dev/fun/page-transition/ and the full CSS in question here https://sleekwp.dev/fun/page-transition/css/page-transition.css

@vmpstr
Copy link
Collaborator

vmpstr commented May 26, 2022

Hey thanks for reaching out!

The transform animation is happening on the ::page-transition-container element which is an ancestor of the outgoing and incoming images, so if you have something like the following then it should properly adjust the transform speed:

::page-transition-container(post-background) { animation-duration: 10s; }

(PS That's a cool looking demo!)

@powerbuoy
Copy link
Author

Ahh I see! Excellent, thanks for replying so quickly 😁

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

2 participants