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