jonathantneal / flexibility

A JavaScript polyfill for Flexbox
https://jonathantneal.github.io/flexibility/
MIT License
4.33k stars 479 forks source link

flex-wrap: wrap does not work if flex-container's width is "auto" (VirtualMachine - IE9) #71

Open speedornothing opened 8 years ago

speedornothing commented 8 years ago

I think it's a bug.

I changed the code to the following :

// details.flexStyle.main === 'auto' || // delete this line
details.flexStyle.mainOuter /* changed details.flexStyle.main to details.flexStyle.mainOuter */ - details.flexStyle.mainInnerBefore - details.flexStyle.mainInnerAfter - details.flexStyle.mainBorderBefore - details.flexStyle.mainBorderAfter >= line.main + child.flexStyle.mainOuter

then it works.

vinnykov commented 8 years ago

I experience the same problem using IE8 and IE9. If the width of a flex container is set to auto, flex-wrap doesn't work and elements aren't wrapped. If I set the width: 100%, flexbox works as expected and elements are correctly wrapped.