This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26264 - The <wbr> style should be along the lines of wbr::after { content: '\200B'; white-space: normal; }.
Summary: The <wbr> style should be along the lines of wbr::after { content: '\200B'; w...
Status: NEW
Alias: None
Product: CSS
Classification: Unclassified
Component: Display (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Tab Atkins Jr.
QA Contact: public-css-bugzilla
Whiteboard: whatwg-resolved
Depends on:
Reported: 2014-07-04 08:31 UTC by contributor
Modified: 2017-01-24 21:03 UTC (History)
8 users (show)

See Also:


Description contributor 2014-07-04 08:31:04 UTC

The <wbr> style should be along the lines of wbr::after { content: '\200B';
white-space: normal; }. says 'content' only
applies to the ::before and ::after pseudo-elements, so the current style has
no effect, and putting the 'white-space' property directly on the <wbr> would
establish the interaction with whitespace-affecting styles and elements other
than <nobr>.

Chrome and Safari currently implement a behavior like my suggestion; Firefox
does not.

Posted from:
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.3 Safari/537.36
Comment 1 Ian 'Hixie' Hickson 2014-07-07 21:50:26 UTC
'content' will apply to elements directly in due course. We're just a bit ahead of CSS right now.
Comment 2 Ian 'Hixie' Hickson 2014-07-30 05:57:20 UTC
Though maybe we should do <wbr> similar to <br>, with a special 'display-something' value, to make the styling more efficient...
Comment 3 Ian 'Hixie' Hickson 2014-09-08 21:53:57 UTC
dbaron, Tab: since <br> is now defined as "display-outside: newline", should <wbr> be similarly defined ("display-outside: break-opportunity" or something)? Or should we continue to define it as "wbr { content: '\200B'; }" ?
Comment 4 Ian 'Hixie' Hickson 2014-09-19 21:40:47 UTC
I've made it be "display-outside: break-opportunity". Reassigning to Tab for the CSS side.
Comment 5 contributor 2014-09-19 21:41:24 UTC
Checked in as WHATWG revision r8798.
Check-in comment: Get HTML ahead of CSS for the definition of 'wbr'.
Comment 6 fantasai 2017-01-24 19:32:50 UTC
The CSSWG believes that 
  wbr { all: reset !important; display: contents !important; content: "\200B" !important; }
should be sufficient to address this issue and address all concerns, and has therefore declined to add a new display type for this element. Please follow up on if you believe this is not the case. Thanks~
Comment 7 fantasai 2017-01-24 19:36:47 UTC
Sorry, that should be s/reset/unset/
Comment 8 Simon Pieters 2017-01-24 21:03:35 UTC
Thanks, filed to track this for HTML.