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
{{ message }}
Repository navigation
[css-text] Should <wbr> create a break opportunity in nowrap? #3562
It's worth considering what it means for inlinization if we allow it to break lines in ruby.
Although it is technically a question for HTML, it can still interact with CSS features like inlinization, so ideally we should be able to map it with some CSS mechanism.
Doing what Blink does is certainly web compatible (and follows the historic precendent that @fantasai mentioned)
if you want the alternative behavior despite that markup, you can display: none the <wbr>, so authors are not stuck.
Given that the white-space property applies to inlines, and <wbr> with that behavior is reasonably described as something like <span style=white-space:normal>` (or the same on its ::before or ::after), so no particular magic needs to be involved
The same logic applies with white-space: pre instead of white-space: nowrap
Relatedly <wbr> introduces a word break even with word-break: keep-all (and that also works in Firefox)
I agree with @fantasai that no change is needed in css-text to support the existence of an element that behave like that. A clarification in the HTML spec seems like the right place. The right bug to discuss this is probably: whatwg/html#2291
Activity
[LayoutNG] Fix <wbr> within `nowrap` when `nowrap` is set to the block
fantasai commentedon Jan 28, 2019
I seem to recall that WBR was historically used to provide breaks inside a NOBR. I imagine there's a lot of pre-CSS pages that rely on this, I'm not sure what the modern compat requirements are. Some interesting discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=656960 and https://bugzilla.mozilla.org/show_bug.cgi?id=6347 I think this is technically a question for HTML, though.
upsuper commentedon Jan 29, 2019
It's worth considering what it means for inlinization if we allow it to break lines in ruby.
Although it is technically a question for HTML, it can still interact with CSS features like inlinization, so ideally we should be able to map it with some CSS mechanism.
fantasai commentedon Jan 29, 2019
WBR is a breaking opportunity, not a break. I don't think it causes any problem with ruby. :)
frivoal commentedon Jan 30, 2019
display: nonethe<wbr>, so authors are not stuck.white-spaceproperty applies to inlines, and<wbr>with that behavior is reasonably described as something like<span style=white-space:normal>` (or the same on its ::before or ::after), so no particular magic needs to be involvedwhite-space: preinstead ofwhite-space: nowrap<wbr>introduces a word break even withword-break: keep-all(and that also works in Firefox)I agree with @fantasai that no change is needed in css-text to support the existence of an element that behave like that. A clarification in the HTML spec seems like the right place. The right bug to discuss this is probably: whatwg/html#2291
fantasai commentedon Dec 14, 2020
Filed whatwg/html#6227 as a follow-up.