I\'m having an issue with a transition I\'m using to slide a panel in and out.
Please take a look at the following jsbin http://jsbin.com/uvejuj/1/
Notice that
I fixed it in my case by using normal transition for opening (from max-height 0px to max-height 500px) BUT by using an animation when closing, starting from max-height 50vh.
This way the delay is not from shrinking from 5000px to the actual height of your content. The only delay that can appear now is if your content is less than 50% of your screen height, but that works buttersmooth in my cases.
Here's my magic (scss format):
.slide-open{
max-height: 0;
overflow: hidden;
&:not(.open){
animation-name: shrink;
animation-duration: .3s;
}
&.open{
max-height: 5000px;
transition: max-height .9s ease-in-out;
}
}
@keyframes shrink {
0% { max-height: 50vh; }
100% { max-height: 0; }
}