Ok, so the only solution I found was to put a max-width, but the problem is that doing so will only work for certain screen sizes. Is there a better way of doing this?
<div style="display: inline-flex; width:100%;">
<span style="display: inline-flex; color: grey; font-size: 12px; margin-right: 10px;">1
</span>
<span style="overflow-wrap:break-word; ">123456789012345678901234567890 123456 1234567890123456 //long text is hidden as it overflows the parent width, the only way to solve this is using break-word:break-all;
</span>
</div>
So using break-word:break-all; cause the word to break in half making it more difficult to read, that's also a problem.
I can only use flex-box too, because I am using React.
Using width: 40% doesn't work for all screen sizes.
Any other solution?