Pancake lenses can be very short and flat because they do not need large amounts of optical correction, i.e. extra lens elements.
The problem arises when such lenses have too short a focal length to fit in front of the retractable mirrors used in reflex cameras.
In such a situation, a pancake lens focuses in front of, rather than on, the focal plane (film or light sensor) of the camera.
This varies greatly depending upon the lens' build quality, focal length, and maximum aperture.
An extreme example of this trend would be the Pentax DA 40mm F2.8 XS, released in 2012 and measuring only 9.14 millimetres (0.360 in) long.
This is a list of autofocus prime lenses designed for mirrorless cameras that measure between 30 and 38 millimeters in length.