Without using column direction I'm trying to get flex items to fill the remaining vertical space. It doesn't seem to be possible without columns?
<div class="flex-container">
<div class="flex-item" style="height:100px">100PX</div>
<div class="flex-item stretch-v">
Should stretch vertically
</div>
</div>
CSS
.flex-container {
display: flex;
flex-flow: row wrap;
flex:1; // stretch to height of container
align-content: flex-start;
}
.flex-item {
display:flex;
align-self: stretch; // has no effect
flex: 100%;
}
.stretch-v {
align-self: stretch;
}
I understand that by default align-content: stretch will stretch children vertically. However, it does so evenly. Therefore with one element fixed height the second is only proportionally stretched leaving a gap.
Can this be accomplished with rows?
UPDATE:
It seems that this is impossible as
align-content: stretch distributes free space equally across lines
which is why this seems impossible with fixed elements involved or even selecting a single item to fill remaining v-space. This seems like a strange way to spec the feature because it would mean that if you want control of vertical sizing you must change the child's parent's axis to column
.