Since you can't animate to height: auto in CSS3, I created this workaround that creates a smooth animation in either direction and is height-independent.
It works around block elements too, and uses a bezier curve to simulate ease-in-out identically for both short and tall content.