How can I make an element behave like an inline element after a line break, if its parent element has display: flex? I need to ensure that there is no empty space between the icon and the text after a line break.
Image showing the problem:
.parent {
display: flex;
justify-content: flex-start;
align-items: center;
}
<div class="parent">
<h2 class="text">text textttt aaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</h2>
<span class="icon">></span>
</div>
New contributor
User1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.