https://jsfiddle.net/MaxHeadroom/s6h40xrn/
If you resize the map size, the zoom level should be adapted to always show the orange rectangle at maximum possible size.
But fitBounds seems to be broken after resizing the map. Same problem with map.getBoundsZoom().
To reproduce the buggy behaviour, start with a small map size - increase it and decrease it then. Check the console output too.
Or is there some a mistake in my source code?