How to animate from height 0 to auto

Vertical expansion is one of the classic animations every front-end engineer encounters. When a user clicks, hidden content is revealed line by line. While it's straightforward to achieve this with JS, the addition of CSS transitions has made many developers eager to implement it using just CSS. But is it possible? Well… yes and no. In this post, we’ll explore 4 different ways to accomplish vertical expansion.