[whatwg] Interaction of <wbr> and CSS white-space

Boris Zbarsky bzbarsky at MIT.EDU
Fri May 13 20:49:11 PDT 2011


http://www.w3.org/TR/html5/rendering.html#punctuation-and-decorations 
says this:

"The wbr element is expected to override the 'white-space' property and 
always provide a line-breaking opportunity."

Why is this desirable?  It seems to contradict what CSS3 Text is trying 
to define in terms of how the various word-wrapping properties interact: 
"text-wrap:none" (which some white-space values set) is really meant to 
be no line breaks except forced ones (and <wbr> is not a forced break at 
all).

Unless there are very strong reasons for this, I would propose that this 
text be removed and <wbr> be considered like any other line-breaking 
opportunity (spaces, ­, word separator characters, etc, etc).

In terms of compatibility, WebKit seems to do what the spec says right 
now, while Trident (IE9), Presto (Opera 11), and Gecko (trunk) don't 
break on <wbr> in "white-space: nowrap".  So if there are web compat 
issues, they're more likely to arise with the spec's suggested behavior, 
I would guess.

-Boris


More information about the whatwg mailing list