NEW 145236
Fractional-width floated boxes in flexbox, flex-flow: row wrap get laid out one pixel to the right
https://bugs.webkit.org/show_bug.cgi?id=145236
Summary Fractional-width floated boxes in flexbox, flex-flow: row wrap get laid out o...
Dan Wood
Reported 2015-05-20 18:08:30 PDT
Created attachment 253482 [details] Reduction showing problem with layout of flexbox In some circumstance when you have a div with a fractional width (e.g. 66.666%) laid out NOT as a flex box, in a flex box container with 'row wrap' as its flex-flow value, it is laid out one pixel to the right of where it should be. (You can see the left edge of the containing div, but you shouldn't) The attached reduction file shows examples of the problem and some workarounds: 1) The problem 2) A workaround by calculating the width of the larger div to be calc (66.666% - 1px) to make the items fit. 3) An exception to the problem - if it is preceded by a 100% width div 4) A workaround by not specifying the 'row wrap' value of flex-flow.
Attachments
Reduction showing problem with layout of flexbox (3.51 KB, text/html)
2015-05-20 18:08 PDT, Dan Wood
no flags
Additional test case added to reduction, showing 3 items with wrong left-right margins (4.31 KB, text/html)
2015-05-20 20:14 PDT, Dan Wood
no flags
Dan Wood
Comment 1 2015-05-20 20:14:35 PDT
Created attachment 253499 [details] Additional test case added to reduction, showing 3 items with wrong left-right margins I've added another attachment. It's the same as above, but a similar issue that is probably related. I have 3 boxes side by side, and they should use up the entire width of their containing flexbox div. But they don't - there is an extra pixel on the left AND the right where you can see the background color of the containing div shining through. And, this means that the divs are narrower than if, for example, you and 3 side-by-side divs (floated) at 33.33333% width.
Note You need to log in before you can comment on or make changes to this bug.