Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CSS keyframe animation for use with display:none
@include keyframes(slideInAccordion) {
0% {
min-height: 0;
max-height: 0;
display: none;
}
1% {
min-height: 0;
max-height: 0;
display: block;
}
99% {
min-height:none;
max-height:50em;
display: block;
}
100% {
min-height:none;
max-height:none;
display: block;
}
}
.accordion-content {
display:none;
min-height: 0;
max-height: 0;
overflow:hidden;
@include animation-name(slideInAccordion);
&.accordion-open {
display:block;
min-height:none;
max-height:none;
@include animation-duration(500ms);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment