-
Notifications
You must be signed in to change notification settings - Fork 94
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
Layout issue with neon-animated-pages #101
Comments
Hi, Both neon-animated-pages and iron-pages don't have a specified height in their styling so they only become as big their child elements. The problem is in neon-animated-pages, the content is given position:absolute in order to make the pages properly animate (you can see this yourself by removing the attribute and watching the animations) A suggested solution is to give neon-animated-pages a height in one of your stylesheets (eg. height: 100% ) but choose carefully or the pages will cover your footer. Another suggestion is to have javascript set neon-animated-pages height to the height of it's children. Unfortunately, neither of these solutions aren't pretty but they work to some degree. |
@PaulHMason @ajtam gave a pretty good explanation of the problem. Closing for now. |
Is there any chance this issue gets revisited for future releases? Wouldn't it be better if I am running into this problem now and was able to solve it for This seems to be an important issue, since it's not a remote use case that gets problematic. Thank you |
@rodrigogoncalves by default there's an iron-selected class that is added to the currently selected element. In order to fix your issue you just have to create a css rule for that element that sets it as position: static. For example: neon-animated-pages .iron-selected { This solution will allow for the transitions to work properly. The neon-animated-pages element also has a property called selectedClass, with which you can set the name of the class you wish to use for the selected elements (in case you don't want to use the default one, iron-selected). |
@rodolfobc, although your solution pushes the page height to accommodate both |
This has to have a solution ! Maybe apply the animation on an absolute positioned duplicate, and when the animation ends the child with position relative is displayed while the duplicate is hidden.. |
I'm not familiar with the animations, but after trying out:
It seems to work fine, without "jumping" animations. |
For me the perfect solution was |
@tfoltynski solution works perfectly so far |
I'm using the
I then set a listener for
This causes To transition while the animation is happening, I had to copy
I removed the relative positioning because if not all It would be nice to simply provide a mixin on |
I noticed the content jump is due to the padding on contentContainer inside of app-header-layout being implemented when the neon-pages animation finishes. My fix (slightly hacky) is to simply set padding-top equal to the height of app-header on the content. When the animation finishes simply set the padding back to zero; You can listen to onNeonAnimationFinish like so
|
For me the problem was that the |
For me the solution was neon-animated-pages {
position: static;
} |
I'm having an issue with neon-animated pages layout. I have the following markup within a Polymer control template, but if I use neon-animated-pages the footer appears above the pages. It works as expected with iron-pages. Is there any simple way of getting the expected behavior?
The text was updated successfully, but these errors were encountered: