Re: Transitioning top and bottom properties.

On May 31, 2011, at 12:46 PM, Alan Gresley wrote:

> I would appreciate seeing use cases with width, height, etc with auto.

Off the top of my head: an accordion menu control [1] needs this sort of thing. The pane-collapsing animation in that demo involves animating height, padding-top, and padding-bottom to zero. When the pane is made active again, the animation is reversed, and the three properties are animated back to their original values. This ought to work the same way whether height is `auto` or some explicit value.

Also consider the details pane underneath a YouTube video, and how it expands when clicked. But the expanded height of the pane varies based on the length of the video's description, so it'd have to animate to `height: auto` rather than a fixed height.

I can't think of any use cases that involve `auto` values for offset properties. But I agree with Brad about how important it is that browsers be able to animate to `auto` values for width and height.

Cheers,
Andrew


[1] http://jqueryui.com/demos/accordion/

Received on Tuesday, 31 May 2011 20:12:22 UTC