[csswg-drafts] [css-multicol] Defining what happens with column-fill in unconstrained containers for continuous and fragmented contexts (#4689)

rachelandrew has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-multicol] Defining what happens with column-fill in unconstrained containers for continuous and fragmented contexts ==
A previous version of the multicol specification contained the paragraph:

> "In continuous media, this property [column-fill] will only be consulted if the length of columns has been constrained. Otherwise, columns will automatically be balanced."

This was commented out in the spec in [2012](https://github.com/w3c/csswg-drafts/commit/e0a990c7e6514f95f1d0c3d6ccb08f4552365f44).

Chrome and Webkit implemented column-fill as per this line in the spec. Therefore the value of `column-fill` is only consulted if (in horizontal-tb) a `height` has been given.

The initial value for `column-fill` is `balance` so content is balanced across columns. If we use `column-fill: auto` the browser should fill columns sequentially.

See [this CodePen](https://codepen.io/rachelandrew/pen/gZedrZ).

In example 1 we have an unconstrained container and `column-fill: auto`. Chrome is ignoring `column-fill` and continues to do the default of balancing. Firefox is consulting the `column-fill` property and because the container is unconstrained fills the first column with all content.

In example 2 we do have a height on the container and so both browsers do the same thing - filling the columns sequentially.

We resolved in https://github.com/w3c/csswg-drafts/issues/3224#issuecomment-468089503 to return the spec to match the Chrome implementation, and also to add min and max-height as a constraint that would trigger this behavior.

Then in https://github.com/w3c/csswg-drafts/issues/4036 we reverted this change, leaving the behavior undefined.

In #4036 @dbaron suggested changing the text to say:

> "In continuous contexts, **and for the last fragment in fragmented contexts**, this property will only be consulted if the length of columns has been constrained in the block dimension"

and also [provided a table](https://github.com/w3c/csswg-drafts/issues/4036#issuecomment-503648397) of what the different values would mean. The Yes/No column is whether we balance (yes) or not (no) and the asterisk the values that would change.

So we need to decide what happens when a multicol container is not constrained and `column-fill` is `auto`. Do we return to the previous spec behavior (like Chrome and Webkit) or do what Firefox does and always honor `auto`?

If we do return to the previous behavior, do we make the addition that @dbaron suggested and in fragmented contexts *also* consult the property when we are in the last fragment?


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4689 using your GitHub account

Received on Wednesday, 22 January 2020 12:49:29 UTC