html, body {
height: 100%;
}
.fill-height {
height: 100%;
display: flex;
flex-direction: column;
}
.fill-height > div {
border: 1px solid red;
min-height:2em;
flex-shrink: 1;
}
.fill-height > div:last-child {
flex-grow: 1;
}
<section class="fill-height">
<div>
row 1 (shrink)
</div>
<div>
row 2 (shrink)
</div>
<div>
row 3 (grow)
</div>
</section>
Link to JsFiddle