JSFiddle - React, Tailwind, and code Playground
by jimousse
HTML
<div class="parent">
<div class="child2">
<button class="mybutton">
<span class="magic">
need to grow
</span>
</button>
</div>
</div>
CSS
.parent {
height: 150px;
width: 200px;
display: flex;
flex-direction: column;
background: salmon;
border: 2px solid black;
}
.child2 {
display: flex;
flex-direction: column;
flex-grow: 1;
background: grey;
width: inherit;
}
.mybutton {
flex-grow: 1;
display: flex;
flex-direction: column;
background: purple;
width: inherit;
}
.magic {
flex-grow: 1;
width: inherit;
background: lightblue;
}