Closed
Bug 875078
Opened 12 years ago
Closed 12 years ago
Inline-block min-intrinsic width doesn't consider a linebreak on '-' (hyphen) when there's less than 13 characters
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 809020
People
(Reporter: gooz, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803
Steps to reproduce:
An element with text without space but an hyphen and less than 13 characters.
Displaying that element in inline-block and adding word-wrap:break-word;
See : http://dabblet.com/gist/5629699 and resize the view.
Actual results:
The text doesn't break when there's 12 characters or less
Expected results:
The text should break on hyphen
![]() |
||
Comment 1•12 years ago
|
||
word-wrap:break-word does not affect intrinsic min-size calculations. http://www.w3.org/TR/css3-text/#overflow-wrap is very clear on this:
Soft wrap opportunities not part of ‘overflow-wrap: normal’ line breaking are not
considered when calculating ‘min-content’ intrinsic sizes.
So per spec the behavior for the width here should be the same whether word-wrap is "break-word" or "normal".
Thus the only question is whether there should be a break opportunity on the '-' here. I believe we purposefully do not break on '-' when the strings to its sides are too short, so the behavior there looks correct too. The spec does not define when '-' is a valid soft wrap opportunity, explicitly deferring to hyphenation and breaking heuristics.
I suspect this is wontfix, since we generally do not in fact want to break on the '-' in cases like this...
Summary: Inline-block element won't break properly with word-wrap:break-word when there's less than 13 characters → Inline-block min-intrinsic width doesn't consider a linebreak on '-' (hyphen) when there's less than 13 characters
Comment 2•12 years ago
|
||
I'm not sure about WONTFIX - I think we really should do something better here, for examples such as narrow table columns - but this is already filed as bug 809020.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•