I've got flex container with two children elements that need to wrap when my screen gets smaller. The problem is that I want my flex container to keep adjusting its width to content i.e. to children inside instead of parent element. I tried using display: inline-flex
and it works when children fit into one line, unfortunately it stops working when they got wrapped.
How can I achieve flex container adjusting to its content while using flex-wrap: wrap
property?