<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24620</bug_id>
          
          <creation_ts>2014-02-11 16:08:09 +0000</creation_ts>
          <short_desc>Needed a rule for user agents about the correct &lt;wbr&gt; rendering mechanism. If such a mechanism can be changed, this element will be used to finally get rid of &amp;shy; in text content.</short_desc>
          <delta_ts>2014-03-08 01:56:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#the-wbr-element</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>anakin_rendine</cc>
    
    <cc>ian</cc>
    
    <cc>master.skywalker.88</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>100298</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-02-11 16:08:09 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html
Multipage: http://www.whatwg.org/C#the-wbr-element
Complete: http://www.whatwg.org/c#the-wbr-element
Referrer: 

Comment:
Needed a rule for user agents about the correct &lt;wbr&gt; rendering mechanism. If
such a mechanism can be changed, this element will be used to finally get rid
of &amp;shy; in text content.

Posted from: 84.220.197.15
User agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100304</commentid>
    <comment_count>1</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-11 18:41:06 +0000</bug_when>
    <thetext>Sorry. The rule is present in the &quot;Rendering&quot; section. A rule which renders the element completely useless, but it is there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100314</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-11 19:45:15 +0000</bug_when>
    <thetext>Is there a remaining issue to be resolved here, or should the bug be closed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100324</commentid>
    <comment_count>3</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-11 20:25:52 +0000</bug_when>
    <thetext>I&apos;m afraid no issue could ever solve the problems of &lt;wbr&gt;. Are you aware that it&apos;s the only tag that never ever receives any {content} value in any of the major browsers?, neither when applied on the element itself, nor when styles are applied on :before and :after pseudo-elements?
 - Chrome, Opera, Safari (latest editions) do not support {content:&apos;string&apos;} on real elements, and stop rendering them properly when such a property is stated.
Anyway they do support {content:url(&apos;URL&apos;)} both in existing elements (container and empty) and non-existing ones. Moreover, they support pseudo-elements on some rendered elements (I tested it on &lt;img&gt; and &lt;br&gt;)only when their rendering is overridden by a (non-recognized) {content:string} property.
 - Mozilla Firefox and Internet Explorer simply do not recognize ANY {content} on real elements, so they ignore the statement on real elements and, for inline rendered elements (&lt;img&gt; and &lt;br&gt;), no content is rendered for :before and :after either.
 - &lt;wbr&gt; receives no style and no pseudo-element. It&apos;s probably the umpteenth new HTML element whose behavior depends on native browser support. But a zero-width space is not always the best choice for internal word division.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100413</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-12 17:28:26 +0000</bug_when>
    <thetext>So... do you want a change to the spec? If so, what, exactly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100423</commentid>
    <comment_count>5</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-12 18:51:11 +0000</bug_when>
    <thetext>I don&apos;t think a change can be really achieved. Anyway if it were possible, as text is rendered in pseudo-elements depending on inline elements, it would be useful to define &lt;wbr&gt; as follows
wbr::after { content: &apos;\200B&apos;; }
and nothing at all on &lt;wbr&gt; itself, so that it does not trigger the behavior of &lt;img&gt; and &lt;br&gt; (no pseudo-elements rendered in some browsers).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100637</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-14 21:56:23 +0000</bug_when>
    <thetext>Why would
   wbr::after { content: &apos;\200B&apos;; }
...be better than
   wbr { content: &apos;\200B&apos;; }
...? I don&apos;t follow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100663</commentid>
    <comment_count>7</comment_count>
    <who name="Andrea Rendine">master.skywalker.88</who>
    <bug_when>2014-02-15 00:43:24 +0000</bug_when>
    <thetext>That content is a string. No user agent, as of now, renders the content of real elements when it is a string (3 out of 5 do it if it is a URL). If it changes, next update of user agents will do it well. Otherwise we&apos;ll have to wait a full implementation of {content} in real elements and I think it will take more (seeing what Opera did retiring its support of this feature from v.12 to v.17, or at least I remember so).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101014</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-20 20:48:56 +0000</bug_when>
    <thetext>The spec uses CSS features that aren&apos;t widely implemented yet to explain things, yes. I&apos;m not sure I follow why this is a problem, though. If you want the browsers to catch up, file a bug with the browsers. :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101037</commentid>
    <comment_count>9</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-20 21:45:16 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #8)
&gt; The spec uses CSS features that aren&apos;t widely implemented yet to explain
&gt; things, yes. I&apos;m not sure I follow why this is a problem, though. If you
&gt; want the browsers to catch up, file a bug with the browsers. :-)

Browsers won&apos;t follow the addition of {content} in real element just for this. Anyway, looking to the future, what will happen when this property is defined on container element with a real content?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101038</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-20 21:46:21 +0000</bug_when>
    <thetext>I don&apos;t understand the question. Are you asking how the &apos;content&apos; property is intended to work? If so, that&apos;s a question for the CSS working group.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101041</commentid>
    <comment_count>11</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-20 21:56:08 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #10)
&gt; I don&apos;t understand the question. Are you asking how the &apos;content&apos; property
&gt; is intended to work? If so, that&apos;s a question for the CSS working group.

I&apos;ll do it anyway to understand this, because it is important. Here I only wanted to ask you reconsidering default rendering for an element, because now it is not stylable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101045</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-20 22:11:52 +0000</bug_when>
    <thetext>I don&apos;t see how changing the default style would affect whether it would be styleable or not. Can you elaborate?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101057</commentid>
    <comment_count>13</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-20 22:35:41 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #12)
&gt; I don&apos;t see how changing the default style would affect whether it would be
&gt; styleable or not. Can you elaborate?

As of now, the default for &lt;wbr&gt; as suggested in the rendering version of the HTML spec cannot be obtained, because it relies on an unsupported feature. But UAs are used to implement it (some of them also do it badly IMO, e.g. Chrome, because it forms a closing tag after it, a thing that it doesn&apos;t do with other void elements. But it&apos;s just another story). How they implement it is not clear, but I think they do it with internal support mechanisms. And this prevents authors from changing such mechanisms.
If a word break occurred as you expect, the word would break because the element is treated like a zero-width space. And if the author changes this to another character (let&apos;s say a soft hyphen which would sometimes be preferable in a long-worded language), the element changes as well. This would be the case of wbr{content}, were it supported, but also for wbr::after{content}.
But the former isn&apos;t supported actually. So the browser parses a &lt;wbr&gt;, closes the tag if needed and sees it like &quot;some kind of inline element whose purpose is to break long strings of word characters&quot; and prevents any other style to be applied on it, as it does with &lt;br&gt;. It doesn&apos;t apply your default, so authors can&apos;t modify it.
Of course if you change the default it will take a while for browsers to adapt. But it will probably be a shorter time than waiting for them to implement element{content}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101073</commentid>
    <comment_count>14</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-20 23:58:50 +0000</bug_when>
    <thetext>I don&apos;t understand why you think it would be a shorter time. Can you elaborate on the basis on which you&apos;re determining this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101079</commentid>
    <comment_count>15</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-21 00:35:43 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #14)
&gt; I don&apos;t understand why you think it would be a shorter time. Can you
&gt; elaborate on the basis on which you&apos;re determining this?

2 browsers out of 5 could already do it. If span:after{content:&apos;\00AD&apos;;} is applied and then some &lt;span&gt; element are used instead of &lt;wbr&gt; (empty and placed in breaking points), line breaks appropriately and the hyphen appears. Only Chrome, Opera and Safari should fix a bug (the line breaks if the content is a white space but it doesn&apos;t with 0width spaces and hyphens). All they&apos;d have to do is to treat &lt;wbr&gt; like a &lt;span&gt; in my example.

&lt;style&gt;
span:after{content:&apos;\00AD&apos;;}
&lt;/style&gt;

&lt;p&gt;breaking&lt;span&gt;&lt;/span&gt;breaking&lt;span&gt;&lt;/span&gt;breaking&lt;span&gt;&lt;/span&gt;breaking&lt;span&gt;&lt;/span&gt;breaking&lt;span&gt;&lt;/span&gt;breaking&lt;span&gt;&lt;/span&gt;breaking&lt;/p&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101125</commentid>
    <comment_count>16</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-21 17:47:30 +0000</bug_when>
    <thetext>I don&apos;t understand why browsers implementing ::after and U+00AD line breaking means that browsers are at all likely to change their &lt;wbr&gt; implementations before &apos;content&apos; is implemented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101127</commentid>
    <comment_count>17</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-21 17:59:17 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #16)
&gt; I don&apos;t understand why browsers implementing ::after and U+00AD line
&gt; breaking means that browsers are at all likely to change their &lt;wbr&gt;
&gt; implementations before &apos;content&apos; is implemented.

Because &lt;wbr&gt; seems to be meant to solve the problem of word-breaking through the use of the rendering layer (i.e. it does what it does because CSS associates it with pseudo-content and this breaks words). If they implement this concept in a way every browser is able to do as of now, they&apos;ll achieve the very same objective (inserting a zero-width space via CSS and allowing authors to change this character to one more suitable if needed). I think that modifying UA stylesheet for next versions is easier than implementing element{content} AND modifying UA stylesheet. I mean, they already have the technology and it only has to be exploited. Half the work is done. It&apos;s a matter of logic, I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101136</commentid>
    <comment_count>18</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-02-21 19:14:55 +0000</bug_when>
    <thetext>The problem with that is that it means the browser vendors wasting time changing one thing that they know they&apos;ll change again later. That&apos;s churn. It&apos;s better for the spec to say where they should be aiming on the long term.

Having said that, if you want to get the browser vendors to take baby steps towards this, it is worth filing bugs with them saying that while they don&apos;t have &apos;content&apos; implemented on elements, they should instead implement this using a pseudo-element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101138</commentid>
    <comment_count>19</comment_count>
    <who name="">anakin_rendine</who>
    <bug_when>2014-02-21 19:30:33 +0000</bug_when>
    <thetext>(In reply to Ian &apos;Hixie&apos; Hickson from comment #18)
&gt; The problem with that is that it means the browser vendors wasting time
&gt; changing one thing that they know they&apos;ll change again later. That&apos;s churn.
&gt; It&apos;s better for the spec to say where they should be aiming on the long term.
&gt; 
&gt; Having said that, if you want to get the browser vendors to take baby steps
&gt; towards this, it is worth filing bugs with them saying that while they don&apos;t
&gt; have &apos;content&apos; implemented on elements, they should instead implement this
&gt; using a pseudo-element.

The theoretical part of me feels that you&apos;re right. The technical part of me says that it would have wonderful to use &lt;wbr&gt; now and correctly (I have an old question with &amp;shy; and content, never mind).
Anyway the solution you have proposed is a good compromise, or lest it would be if I were that &quot;important&quot; to suggest such things to vendors. Thank you nonetheless.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102098</commentid>
    <comment_count>20</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-08 00:52:19 +0000</bug_when>
    <thetext>For what it&apos;s worth, I don&apos;t think you&apos;d have any less luck than I would convincing them to implement that. :-) The problem wouldn&apos;t be that the person is unimportant, more that the arguments for the feature aren&apos;t compelling enough...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102102</commentid>
    <comment_count>21</comment_count>
    <who name="Andrea Rendine">master.skywalker.88</who>
    <bug_when>2014-03-08 01:56:43 +0000</bug_when>
    <thetext>Big issues don&apos;t get fixed because they&apos;re too big and difficult. Small issues don&apos;t get fixed either because they&apos;re too small and unimportant.
Anyway I&apos;ll find a way how to convince them supporting a workaround, or maybe other ways will come for this. I just noticed that using &amp;shy; in prose, as using any other character-level separation, gives problems in 2 important cases:
 - when copying text from a web source containing character separators, often zero-width spaces appear as &quot;unrecognizable characters&quot; (question marks or empty blocks), while soft hyphens are translated into simple hyphens
 - search engines index badly pages whose text contains character-level exotic separators.

&lt;wbr&gt; resolves these issues because the separator is markup-level. Someone should use these arguments with them. Wider support -&gt; wider use -&gt; better results in search engines and data mining.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>