I have a button inside a flex box. I wanted to take up as much space as possible, but I also want this flex box to have a min height, because after you click this button it will be replaced by dynamic text. If this dynamic text is really long, I want to flex box to grow in height so that all the text fits.
Here is what I've tried: https://codepen.io/tietyt/pen/xxZRYdd
<div class="container">
    <button disabled="" tabindex="0"> Text </button>
</div>
.container {
    display: flex;
    flex-direction: column;
    margin-bottom: 3em;
    width: 100%;
    text-align: center;
    border-style: outset;
    min-height: 5em;
}
.container button {
    align-self: stretch;
}
 
    