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

RE: Questions about 'column-span'

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Thu, 20 May 2010 09:47:23 +0000
To: David Hyatt <hyatt@apple.com>, "www-style@w3.org list" <www-style@w3.org>
Message-ID: <5258A1A783764C478A36E2BC4A9C497E096F9B@tk5ex14mbxc105.redmond.corp.microsoft.com>
Great questions.

First, I'll agree the value of column-span is marginal, and with the only two remaining values the property is somewhat a misnomer. If it is cut, no major use cases will be impossible IMO.

The meaning of a column span in a nested context is easy to define though. Multicolumn layout has to honor page breaks anyway, and those can happen anywhere. Encountering a column-span should be handled the same as encountering a page break, performing column balancing at the page break, inserting the column span and continuing. I am not saying it is an easy problem, but the hard issues around it need to be dealt with anyway...

Once something is a column-span, it seems it should do what page floats do (in terms of BFC, margins, backgrounds etc.). Yes that behavior so far is underspecified too.

That said, dropping column-span entirely seem an attractive idea for implementation, and not a proven loss for use cases.

-----Original Message-----
From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of David Hyatt
Sent: Thursday, May 20, 2010 1:49 AM
To: www-style@w3.org list
Subject: Questions about 'column-span'

I was thinking about the column-span property as I rewrite multicolumn layout in WebKit, and it seems pretty crazy to me.


(1) Are there any implementations of this property yet?  My own vote would be for cutting it, since the desired effect can be pretty easily obtained by just wrapping the contents underneath headings in a block and putting multi-column styles on those content blocks.

(2) How far into the descendants of the column can you go and still honor a column-span?  For example, can a block inside an inline-block that is in a multi-column layout really "break out" of the inline-block and span the whole set of columns?  What about descendants of an overflow:hidden element inside a multi-column element?  I'm not sure that case even makes sense.

My own proposal for resolving this would be that column-span can only apply to objects within the same block formatting context as the multicol block.  That prevents objects inside overflow:hidden blocks or inline-blocks from being considered.

(3) Can the column-span element be an inline?  I'm inclined to say that it has to be a block-level element.  It seems weird to me to break an inline out of flow like that (that could possibly span multiple lines).  You'd have to at the very least make an anonymous block to wrap the inline anyway.

(4) What happens to the margins of a column-span element?  
	(a) Do its margins disappear? 
	(b) Do they stick around but not collapse with the columns before or after?
	(c) Does a column-span element collapse its margins with the top of the multicol block? With the bottom?
	(d) What happens to two contiguous column-span elements with no column content between them? Do their margins collapse with one another?

(5) Does a column-span element establish a new block formatting context?  For example, a column-span element could contain floats that protrude from its space, unless we say that it grows to encompass those floats.  If a column-span element does have floats that protrude, do the following columns attempt to avoid the float?  Again the question of contiguous column-span elements comes up.... if the first element has an overhanging float does the content of the second column-span element avoid it?

(6) What happens with nested column-span elements when the outer column-span element establishes a 2nd nested set of columns?  Do the margins of the outer column-span element and the inner column-span element collapse together if they are contiguous?

(7) What background renders behind a column-span element when its transparent?

(8) If the column-span element has horizontal or vertical margins, what are the hit testing rules when you're in those margins?  Are you inside the parent element of the column-span (which itself may just be in columns) or are you in the multicol block?

I have many more questions... this is just a start.  I think the point I'm trying to make by putting all of these questions out there is that this property is woefully underspecified, and I think it needs to either be fleshed out significantly or dropped from the spec.  My vote would be to drop it.

Received on Thursday, 20 May 2010 09:48:01 GMT

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