New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 671491 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 638530
Owner:
NOT IN USE
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

multi-columns are not balanced (specifically tested with 3-column layout)

Reported by toufali....@gmail.com, Dec 6 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36

Example URL:
https://jsfiddle.net/2dn03zrp/

Steps to reproduce the problem:
1. visit https://jsfiddle.net/2dn03zrp/
2. notice empty 3rd column, while 1st column has 2 items
3. odd behavior is also noticed if you add a 4th item, or remove an item (2 items total) - the 3rd column is never used.

What is the expected behavior?
Expected the 3rd column to be filled, especially since column-fill is explicitly set to 'balance'. (It should already default to 'balance', but I set it anyway to be sure.)

What went wrong?
The 3rd column is not filled when it seems like it should obviously be.  The 3rd column works as expected on Firefox.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 54.0.2840.99  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 23.0 r0
 
Components: -Blink Blink>Layout>MultiCol

Comment 2 by ajha@chromium.org, Dec 6 2016

Labels: M-54

Comment 3 by e...@chromium.org, Dec 8 2016

Owner: msten...@opera.com
Status: Assigned (was: Unconfirmed)

Comment 4 by msten...@opera.com, Dec 8 2016

Mergedinto: 638530
Status: Duplicate (was: Assigned)
I reviewed the suggestion about orphans/widows in the merged thread, but they doesn't fix the case of 4 elements in 3 columns.  As shown in this example, the 3rd column still remains empty even when orphans and widows are set to 1: 

https://jsfiddle.net/L5hww7h5/

Is this then a bug with orphans/widows, or still with the columns, or is there something else missing to get a truly balanced 3-column layout?

Thanks,
Amrir

Comment 6 by msten...@opera.com, Dec 11 2016

You have 4 lines and 3 columns. That means that each column needs to fit 1.3333 lines, or actually 2 lines, since lines are unbreakable. Thus you get 2 lines in the first column and 2 lines in the second column, and nothing in the third column. Not a bug.
Thank you for the very helpful clarification.  

To me, the algorithm used to fill columns seems odd.  Or perhaps the bigger issue lies with the column-fill:balanced property, which allows far-from-balanced results!  I'll look for an alternative.
-A

Sign in to add a comment