digging in $ .css to $ .style to $ .cssHooks to $ .cssHooks.height.get, we see the culprit:
function ( elem, computed, extra ) { if ( computed ) { // certain elements can have dimension info if we invisibly show them // however, it must have a current display style that would benefit from this return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? jQuery.swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); }) : getWidthOrHeight( elem, name, extra ); } }
It seems they change the style, copy the value, and then change it to the display: none.
source share