0👍
✅
In the first example overflow doesn’t occur because there are no whitespaces in the string. But there are whitespaces in the second example.
If you want to avoid line break, just add a CSS rule for the container
white-space: nowrap;
Source:stackexchange.com