Another option is to add another tag with flex: auto
style in between your tags that you want to fill in the remaining space.
https://jsfiddle.net/tsey5qu4/
The HTML:
<div class="parent">
<div class="left">Left</div>
<div class="fill-remaining-space"></div>
<div class="right">Right</div>
</div>
The CSS:
.fill-remaining-space {
flex: auto;
}
This is equivalent to flex: 1 1 auto, which absorbs any extra space along the main axis.