-
Notifications
You must be signed in to change notification settings - Fork 495
space-between doesn't work right when meet tag <br> in flex-items #253
Comments
Chrome and Firefox actually got this right. |
@garrettw yes, fixing it is easy. but I think it is also a bug of flexbox, so let's list it here. |
I'm telling you it's not a bug. Want proof? Read Mozilla's flexbox documentation - scroll down just a bit and look under the heading "The flex-basis property", where you'll find this:
The "fix" I mentioned is the proper way to do what you want. |
@garrettw uhm. I got it. According to the spec, Chrome and Firefox work right and IE may work wrong, right? In IE, the items' size are divided equally from the parent container whatever there are BR tags in the items or not. |
Yes. Interestingly enough, I think I may have stumbled across a bug somewhere as I'm testing this. As soon as I can identify the nature of the bug, I'll post it here and if it's new, I'll create a new issue for it. |
First, I'll explain what's happening. You've discovered Flexbug #15 -- on The other thing I noticed is that Chrome and Firefox do collapse the |
I think this issue can be closed now. |
I have built an page to denote this bug.
please visit
link
This is a flex bug on BR tags. The 【.container】 is a flex container, and 【.items】 is its sub-container, which is also a flex container too. When there are 【br】s in the 【.item】, the 【justify-content:space-between】 in 【.items】 doesn't work right. All the items will layout very closely. And I have checked all the browsers I have. IE11 is the only one works right. Neither Chrome v63 nor Firefox v57 work right. What if you remove the 【display:flex】 in the 【.container】, they all work right;
The text was updated successfully, but these errors were encountered: