Open Bug 630864 Opened 13 years ago Updated 2 years ago

word-wrap: break-word; doesn't affect descriptions/labels unless you override their minimum width

Categories

(Core :: Layout, defect)

defect

Tracking

()

People

(Reporter: neil, Unassigned)

Details

Attachments

(1 file)

3.29 KB, application/vnd.mozilla.xul+xml
Details
If you have a long word, e.g. Supercalifragilisticexpialidocious, and you put it inside a block (e.g. a <div>) with a maximum width and word-wrap set to break-word, the word will break at the maximum width as expected. However if you attempt the same thing with a XUL <description> or <label> element then the word will not break unless you additionally override the minimum width.

If you interpose a <div> between the <description>/<label> and the text you can of course set a maximum width on the <div>, however setting a maximum width on the <description>/<label> still does not work. By comparison, setting a maximum width on an outer nested <div> does work.

As a side note, overriding the minimum width on the container element does not work at all except in one case: a <vbox> containing a <vbox> with both minimum and maximum width and align="start" containing a <description>/<label>.
Neil, could you attach your testcases here?
Attached file Test cases
Key:
red: incorrect; would wrap if string contained spaces
yellow: correct, but only through abuse of min-width
green: correct; spaces don't change wrapping behaviour
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: