When there's an outer div with display: flex, and inner div with flex: 1 0 auto and an input inside with width: 100%, the input breaks out of the container at a certain size. This is likely the default min size of an input, however setting min-size: 0 does not fix it. Removing the flex basis auto does resolve it, but I'd like to know why (as the default flex basis value is auto anyway) and how it can be fixed still keeping flex basis and the current HTML structure as closely as possible.
Example: https://jsfiddle.net/xjh2635s/
.outer {
background-color: blue;
padding: 10px;
width: 150px;
}
.container {
display: flex;
}
.inner {
flex: 1 0;
flex-basis: auto;
}
input {
box-sizing: border-box;
width: 100%;
}
<div class="outer">
<div class="container">
<div class="inner">
<input type="text">
</div>
</div>
</div>
