Re: Questions about 'column-span'

On May 23, 2010, at 9:14 AM, MURAKAMI Shinyu wrote:

> I prefer the left image, but I don't think the margins should collapse
> between spanning elements and their non-spanning siblings.
> I think the margins of spanning elements should be kept and
> the margins of non-spanning siblings should be discarded.
> 

I'm fine with this I guess, but note that spanning elements still need to be able to collapse their margins with the multi-column block itself.  In this example:

<p style="column-count:2; ">
<span style="column-span: all">HHHHHHH</span>
</p>

You would not expect to see the top margin of the <span> inside the columns block.  It needs to collapse with the <p>.  You also don't want to just discard it, since imagine putting two of those together:

<p style="column-count:2; ">
<span style="column-span: all">HHHHHHH</span>
</p>
<p style="column-count:2; ">
<span style="column-span: all">HHHHHHH</span>
</p>

You'd expect for the spans to collapse with their enclosing paragraphs and ultimately with one another as well.

I really think the simplest rule is just to allow margin collapsing with both spanning and non-spanning siblings, but I'd also be fine with allowing margin collapsing with spanning children only and discarding the margins of non-spanning elements at the top of the first column (and after both forced and unforced breaks).

If my proposal for how to implement column-span is used, then note that the margin collapsing of spanning elements happens naturally as a consequence of the block splitting and alterations that occur, since the enclosing block of the column-span is no longer considered multi-column (and thus no longer establishes a BFC).

dave
(hyatt@apple.com)

Received on Sunday, 23 May 2010 21:05:59 UTC