[csswg-drafts] [css-multicol] Multi-col, spanner margin collapsing, and formatting contexts

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

== [css-multicol] Multi-col, spanner margin collapsing, and formatting contexts ==
Example 25 in [multicol](https://drafts.csswg.org/css-multicol-1/) contains the following sentence:

> The margins between the two spanners collapse with each other. 

This seems reasonable, and I believe we discussed this and resolved in favor of it years ago, but I do not think it is fully supported by normative text. It is not contradicted by normative text either, but given that the multicol container is not a normal block formatting context, the behavior does not just fall out, and needs to be specified.

Arguably, it may fall out of this sentence, in section 2:
> A multi-column container establishes a new block formatting context, as per CSS 2.1 section 9.4.1.

but that sentence itself seems strange to me, since a BFC wouldn't know what to do with column boxes, spanners, and the like. The content of the multicol goes into a BFC, but that it doesn't seem to me that the BFC is the multicol container itself. Shouldn't we rather say that:
1. **columns** establish a BFC.
    By the way, I am not sure if that should be a single column box establishing a single BFC, with each column being a fragment of that single box, or if each column is by itself a box which establishes a BFC. The former sounds more intuitive to me, the later seems a more similar to how we describe line boxes.
2. **multicol containers** establishes a **multicol formatting context**, whose formatting model deals with placing columns, spanners, column rules, placing overflowing columns to the right and so on
3. Within that multicol formatting context, the margins of adjacent spanners collapse with eachother, according to the same rules as in CSS2.1, explicitly invoked to work in this FC that isn't a BFC.

Alternatively:
1. _idem_
2. **multicol containers** establishes a BFC which contains **column-row boxes** and **spanner boxes**. Between these, margin collapsing works normally, since we're in a BFC.
3. **column-row boxes** establish a **multicol formatting context**, whose formatting model deals with placing columns, column rules, placing overflowing columns to the right and so on.

Finally, we also probably need:

4. review and maybe clarify / redefine "adjoining margin" in that context, to make sure it is concerned with siblings in the box tree (where spanners are siblings), and not siblings in the element tree (where they may not be). I think this is already fine, but CSS21 is not particularly careful when talking about elements and boxes, so this is worth auditing.

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

Received on Tuesday, 17 April 2018 03:56:48 UTC