Open Bug 821272 Opened 13 years ago Updated 3 years ago

width:100% doesn't work right when parent has display:-moz-box

Categories

(Core :: XUL, defect)

17 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: balazs, Unassigned)

Details

(Whiteboard: WONTFIX?)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 Build ID: 20121128204232 Steps to reproduce: Created an element with a long word and set the style word-wrap: break-word with a parent element using display: -moz-box while the width is less than would fit the word. http://jsbin.com/awobec/1/edit Actual results: Word remained in a single line reaching outside the containing element. Expected results: Word should have been broken into several lines.
This isn't a block display problem. If you set a background on .text you'll see that it's just ignoring the width style when inside a -moz-box, because XUL layout is weird like that. I don't think we have any plans to change XUL layout here. Don't use -moz-box!
Component: Layout: Block and Inline → XUL
Summary: word-wrap: break-word doesn't work when parent has display:-moz-box → width:100% doesn't work right when parent has display:-moz-box
Whiteboard: WONTFIX?
And this has nothing to do with word-wrap either, by the way. There's just no line-breaking here, even if you put spaces in the text.
(In reply to Boris Zbarsky (:bz) from comment #1) > This isn't a block display problem. If you set a background on .text you'll > see that it's just ignoring the width style when inside a -moz-box, because > XUL layout is weird like that. > > I don't think we have any plans to change XUL layout here. Don't use > -moz-box! Ok, I've probably removed to many css rules to prove my point. Btw: I do need flex-box, but I've obviously removed the rest of the page to point out the problem. <a class="jsbin-embed" href="http://jsbin.com/awobec/4/embed?live">JS Bin</a><script src="http://static.jsbin.com/js/embed.js"></script> By adding word-break: break-all, the long word is actually broken up as I would expect.
Embed didn't work, but here is the link: http://jsbin.com/awobec/4/edit You can clearly see that without word-break: break-all, the .text box expands to fit the text even though it should break it.
(In reply to Boris Zbarsky (:bz) from comment #2) > And this has nothing to do with word-wrap either, by the way. There's just > no line-breaking here, even if you put spaces in the text. And there is also the fact that in all ( even IE9 ) other browsers it behaves as expected, breaking the long word to fit into the width of the box!
Sorry, IE10 of course. 9 has no flex-box... Silly me.
> Btw: I do need flex-box, -moz-box isn't flexbox. It's a XUL box, which has completely different layout rules. Flexbox is "display: flexbox".
(In reply to Boris Zbarsky (:bz) from comment #7) > > Btw: I do need flex-box, > > -moz-box isn't flexbox. It's a XUL box, which has completely different > layout rules. > > Flexbox is "display: flexbox". display: flex, now, I think.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.