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

Unintentional scale transition occurring during fade #50

Closed
danDanV1 opened this issue Sep 11, 2018 · 2 comments
Closed

Unintentional scale transition occurring during fade #50

danDanV1 opened this issue Sep 11, 2018 · 2 comments

Comments

@danDanV1
Copy link

danDanV1 commented Sep 11, 2018

Trying to perform a fade with animated-if, but getting a unwanted bonus height & width animation too!

Cause appears related to content overflow and the appearance of the scrollbars, which changes the dimensions of the animated container as the content is toggled. For some reason even though I am only requesting a fade transition, it is animating a size change and creating the unwanted effect of moving the content on screen.

Link to: Example with slow duration to better see what is going on -- You can see the animated-container width and height being animated in the inspector. The fade transition is used here.

Twiddle example (slow duration) -- Make sure to reduce your window size so that when the menu is shown, it has to scroll.

Thought maybe it was an issue with the transition type. But the animation of animated-container occurs even if I used an empty transition type, eg:

    myTransition: function * ({ insertedSprites, removedSprites }) {

    },

The expected behaviour of applying an opacity/fade transition should be that only opacity/fade be animated.

How to prevent the width and height animation of animated-container?

@ef4
Copy link
Contributor

ef4 commented Sep 11, 2018

It should be sufficient to write your CSS so that the animated-container always has a constant size.

@danDanV1
Copy link
Author

Thanks for the hint @ef4! Poor CSS for the Header resulted in some collapsing of it's element, which resulted in animated-container changing size.

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