You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is ­ to hint to a possible line-break opportunity. But as ­ is its own character, copying the underlying text will copy that character as well.
When ­ is inside an element, it will not display a hyphen, even if it is at a line-break.
"Inside an element" includes:
Inside an inline-element (even with display: contents)
Inside a pseudo-element
This rules out the possibility of styling it to behave only as a line-break opportunity, without copying it.
Changing the behavior of ­ is out of question, as it is already used for long and for specific purposes. Also, its definition is debated, but HTML and Unicode seem to have settled on one.
Hence there is still a need for hinting to line-break opportunities without the hint actually encoding a character. Without the ability of styling ­ to mimic said behavior, another solution is required.
There exists a similar case, where U+200B ZERO-WIDTH SPACE can be represented by <wbr> or ​, with the first being unselectable, and the latter as the character itself.
I suggest - as in the zero-width space case - to have a complementary HTML-element for ­.
It should:
Display as a hyphen, if at a break-point
Be respected by hyphens: manual
Be itself unselectable; it is only for visual guidance
Take up space when displayed
Inherit the currently used font
Basically be ­ but unselectable, as in not part of the rendered text, like <wbr>.