Skip to content

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

Closed
@rachelandrew

Description

@rachelandrew

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.

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.

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 #3224 (comment) 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 #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 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?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions