According to MDN:
If
from/0%orto/100%is not specified, the browser starts or finishes the animation using the computed values of all attributes.
In the following example, the height property computed value is 0px:
div#parent {
width: 100px;
height: 100px;
outline: 1px solid teal;
}
div#child {
background: tan;
animation: lengthen 2s infinite;
}
@keyframes lengthen {
to {
height: 100px;
}
}
<div id="parent">
<div id="child"></div>
</div>
But the browser uses height: auto;, which is the element specified value, and that's why the animation doesn't work.
Here's something similar on the spec:
If a
0%orfromkeyframe is not specified, then the user agent constructs a0%keyframe using the computed values of the properties being animated. If a100%ortokeyframe is not specified, then the user agent constructs a100%keyframe using the computed values of the properties being animated.
But if the browser actually added from {height: 0px;}, which is the computed value, then the animation would work properly. Isn't it more accurate to use specified value instead of computed value in the above-mentioned documentation?

MDN has right, because the computed value of height: auto is height: auto. 0px is the used value.
According to MDN again: