I am uncertain if it is achievable, but I am attempting to determine if I can reduce the size of a flex item around a span with text wrapping.
Currently, I am trying to eliminate whitespace to the right of the text in the second row.
body {
height: 75%;
margin: 0;
padding: 0;
}
body > div {
min-height: 55px;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
border-bottom: 1px solid black;
width: 225px;
}
body > div > div {
-webkit-box-flex: 1;
-webkit-flex: 1 1 auto;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
border-right: 1px solid black;
}
body > div > div span {
font-size: 21px;
}
body > div > div:nth-child(1) {
-webkit-box-flex: 0;
-webkit-flex: 0 1 auto;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
}
<div>
<div><span>Some text regular</span></div>
<div>👻</div>
</div>
<div>
<div><span>howdoishrinkthis flexitemtotext</span></div>
<div>👻</div>
</div>
<div>
<div><span>Some text regular</span></div>
<div>👻</div>
</div>