Mozilla in the srcset page says:
If the srcset attribute uses width descriptors, the sizes attribute must also be present, or the srcset itself will be ignored.
However, the same Mozilla in the Responsive images page says:
In this case, sizes is not needed — the browser works out what resolution the display is that it is being shown on, and serves the most appropriate image referenced in the srcset
The more I read it, the more it seems contradictory to me. Are there truly contradictions in Mozilla about sizes and srcset attributes?
It says that
sizesis required only when the optional width descriptors are used.sizesis used in conjunction with the width descriptors in order to allow the browser to calculate pixel density.In the responsive images page, it says sizes can be omitted when using the pixel density (
x') descriptors, which is just rephrasing the what is said in the description for thesrcset` attribute