W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: Questions about 'column-span'

From: David Hyatt <hyatt@apple.com>
Date: Sun, 23 May 2010 16:05:24 -0500
Cc: Hakon Wium Lie <howcome@opera.com>, Bert Bos <bert@w3.org>, "www-style@w3.org list" <www-style@w3.org>
Message-id: <F4A13190-6BEF-48D4-B3F8-7DE7DF5A4F6A@apple.com>
To: MURAKAMI Shinyu <murakami@antenna.co.jp>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:27 GMT