I have a form with one input tag sitting inside a div . I am trying to use form / input for the width of the parent, but I cannot make it respond to flexbox - it just solves its own width and overflows the container.
HTML
<div class="container"> <span>foo</span> <span>bar</span> <form> <input value="baz"/> </form> </div>
CSS
.container { display: flex; width: 150px; border: 1px solid black; }
Screenshot

JSFiddle .
What I would expect is that the flexbox parameter on the parent div will reduce the shape to fit the width, but this does not happen. Instead, form / input just sits with the right width and doesn't compress, even if I install flex-shrink on it.
source share