Every box has two intrinsic sizes, measured from its content:
min-content: the smallest size without overflow, taking every wrap opportunity. For text that's the longest word; for a row of images, the widest image.max-content: the size the content wants with infinite room, taking none. For a paragraph, its whole text on one line.
The keywords let you use those sizes in width, height, min-*, max-*, flex-basis and grid tracks:
width: min-content: wrap as much as possible. Useful for a figure whose caption shouldn't be wider than its image.width: max-content: never wrap; can overflow the container.width: fit-content:min(max-content, max(min-content, available space)). Short content shrink-wraps; long content fills the container and wraps. It's how floats, inline-blocks and absolutely positioned boxes size by default, made available to any block.width: fit-content; margin-inline: autocentres a shrink-wrapped block.
In the block axis, these keywords equal auto for ordinary blocks, because height already comes from content.
stretch is the opposite: fill the containing block, margins included, the way width: auto does for a block. It matters for boxes that would otherwise shrink-wrap. Chrome 138 and Safari 27 support it unprefixed; Firefox 158 only accepts -moz-available and -webkit-fill-available.
aspect-ratio sets a preferred ratio so the size in one axis follows the other: width: 320px; aspect-ratio: 16 / 9 gives a 180px height. It's ignored when both sizes are set. For a non-replaced box that isn't a scroll container, the automatic minimum is still min-content, so tall content grows the box past the ratio rather than overflowing it.
What counts as a wrap opportunity decides min-content. overflow-wrap: anywhere adds opportunities that lower it; break-word breaks long words only at layout time and doesn't change it.