<wbr> rendering

Hi!

Please anybody help me understanding this.

Something like a couple years ago, I filed a bug on the WHATWG HTML Living
Standard project, complaining about how a tag was meant to be rendered. I
received a completely unsatisfying answer, which was basically meant to
tell me to wait. Enough waiting now.

In the spec, <wbr> is meant to be a line break opportunity. The two
examples provided are quite different (a prose with a curious streamlike
formatting, and a code fragment), but this underlines how different use
cases can be.

Now, when reading the prose I thought to myself that this can be a
convenient way to insert hyphenated word breaks, as most languages break
words with a - mark. <wbr> would remove the need for a &shy; soft hyphen.
An alternative to good ol' U+00AD Soft Hyphen is needed because such
character is copypasted along with the text itself, and can be fetched by
data-mining tools, while it isn't strictly part of content. <wbr>, on the
other side, is markup and wouldn't appear where only text is to be fetched.

Now, according to the idea of the spec, an author could style such element
so that its rendering fits to the purpose. For instance, <wbr> inside
<code> could be rendered as zero width space, while <wbr> in paragraphs
could become a soft hyphen.

Except, this is impossible: rendering of <wbr> is obtained with a CSS rule
such as
wbr {content: }

Now, in the last 2 years i saw no improvements in the implementation, by
UAs, of the "content" property applied to real (non pseudo) elements. Nor
would I like to see such a thing, which has no practical uses IMO, and
which would break the separation between content and layout the opposite
way (i.e. in the past, HTML was used for layout, while this way CSS would
define the content).

These considerations are mine, though. What is important now is that <wbr>
doesn't work on its own. It breaks words, right, but any empty <span>
element would do the trick. Why not changing its rendering rule such as
wbr::after {content=} so that it becomes really usable?

Thanks for the attention and for any suggestion you will provide.

AR

Received on Sunday, 8 March 2015 14:00:29 UTC