Currently you can only animate elements with pixel values. This is understandable as the animation API is experimental, but hopefully soon you will be able to set values in animations with an attributed LengthUnit. I might not always know the width or height of an element in pixels, but I do know that I want it to go to from 0 to 100%.
Good idea! Although I still think the percentage option should be there. Some of my elements needs to expand to fit all of their children. These elements can change width and height outside of animations and can therefore not have set pixel values. At the moment I should be able to do some callbacks when the animations are complete and make the height or width percentage values again, but still, having it built in would save me from this trickery.