I want to achieve a multi-line flexbox container where element width can reduce if it's min-width is not reach to not let big whitespace when break line happen. Here is an example on which i'm working on : https://codepen.io/BaptisteG/pen/dyyQodR
.container {
border: 5px solid rgb(111,41,97);
border-radius: .5em;
padding: 10px;
display: flex;
flex-wrap: wrap;
row-gap: 1em;
column-gap: 20px;
width: 500px;
}
.item {
padding: 10px;
background-color: rgba(111,41,97,.3);
border: 2px solid rgba(111,41,97,.5);
flex: 1 1 content;
min-width: 100px;
max-width: min-content;
white-space:nowrap;
overflow:hidden;
}
A sketch of what i want to achieve : sketch I don't want element size to be increase to complete whitespace