Closed
Bug 1500258
Opened 6 years ago
Closed 6 years ago
word-wrap: break-word doesn't break long strings
Categories
(Core :: Layout: Grid, defect)
Core
Layout: Grid
Tracking
()
RESOLVED
DUPLICATE
of bug 1472386
People
(Reporter: mstriemer, Unassigned)
Details
Attachments
(1 file)
36.15 KB,
image/png
|
Details |
If you have a long string in a grid and it should break mid-word to keep from growing outside of its container the word will continue on the same line but the height will be added for it to wrap.
Attached is a picture of my test case in Chrome (left) and Firefox (right).
Here's the code: https://codepen.io/mkstrmr/pen/YJLyRO. There's a basic case at the top and what I noticed this with underneath.
Comment 1•6 years ago
|
||
The problem you're actually running into is that the .name element (the one with `word-wrap`) is wider than you're expecting. And it's wide enough that it doesn't *need* to break any words.
Here's a modified codepen where I've given it a border to show you how wide it is:
https://codepen.io/dholbert/pen/LgmGNg
If you give .name "max-width:100%;" or "width:100%", or "min-width:0", that'll fix the problem:
https://codepen.io/dholbert/pen/bmMEwE
Having said that: *the fact that .name (a grid item) is ending up this wide by default* is a bug, and we've already fixed it, but it apparently had to be preffed off (behind layout.css.overflow-break.intrinsic-size) So this is basically a dupe of bug 1472386, though note that the fix is disabled at the moment.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Comment 2•6 years ago
|
||
(And apparently the reason it's preffed off is beacuse it caused web-compatibility regressions like bug 1479302.)
You need to log in
before you can comment on or make changes to this bug.
Description
•