What is the difference between CSS fit-content and max-content?
fit-content uses max-content, unless available < max-content
, then it uses available. Unless available < min-content
, then it uses min-content.
In a few words width: fit-content;
means :
"Use the space you can (available) but never less than your min-content
and never more than your max-content
"