Jawsh
Active member
An issue I've noticed with my forum is long usernames breaking awkwardly. See this guy.
I could offer him a name change, but that's pretty annoying. A lot of people seem to register with the suspicion that spaces are not allowed.
However, HTML5 introduces a new tag: <wbr>
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr
This is a suggested break.
I think the username parser should insert <wbr> before every capital letter in a username, after the first one. This would mean the output HTML for the above guy's name would be:
<a hrf="#" class="username">Manic<wbr>Street<wbr>Preacher</a>
Under normal circumstances, it would continue to be one word with no breaks. In smaller elements, it'd break like this:
I could offer him a name change, but that's pretty annoying. A lot of people seem to register with the suspicion that spaces are not allowed.
However, HTML5 introduces a new tag: <wbr>
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr
This is a suggested break.
I think the username parser should insert <wbr> before every capital letter in a username, after the first one. This would mean the output HTML for the above guy's name would be:
<a hrf="#" class="username">Manic<wbr>Street<wbr>Preacher</a>
Under normal circumstances, it would continue to be one word with no breaks. In smaller elements, it'd break like this:
Upvote
0