- From: Håkon Wium Lie <howcome@opera.com>
- Date: Sat, 22 May 2010 23:38:13 +0200
- To: Bert Bos <bert@w3.org>
- Cc: "www-style@w3.org list" <www-style@w3.org>
Bert Bos wrote: > > (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. > > Usually there is no such element, though. A typical mark-up would be > > <section> > <h>The title</h> > <p>... > <p>... > </section> > > with > > section {columns: 2} > h {column-span: all} This is one good use caser for column-span: to be able to apply column-span formatting (which is quite common) to existing markup. The other, more advanced, use case is for us to be able to set an integer value on 'column-span' in the future. But that's for the future to decide. > > 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. > > That makes sense. The columns that 'column-span' refers to are those of > the root of the current block formatting context. (If that root is not > a multi-column element, then there are no columns to span > and 'column-span' has no effect.) Agree. > > (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. > > It obviously has to be block-level, but that leaves two possibilities: > > - 'column-span <> 1' *makes* the element into a block, or > - 'column-span' only *applies* to block-level elements. > > The second seems by far the easiest to understand and is sufficient, I > think. > > In some case you would have to add a 'display: block' to make > the 'column-span' work, e.g. in this case: > > IMG {column-span: all; display: block} > > But that is not unusual for IMG. This seems like a reasonable proposal. The draft currently says: Applies to: static, non-floating elements We should probably change that to: Applies to: block-level elements And add some examples in the specifications that show how it only has effect in the current formatting context. > > Do their margins collapse with one another? > > I'd say: > > (a) No, margins don't disappear. > > (b) Is the question if the H2 and the P in this fragment collapse their > margins? > > <DIV STYLE="columns: 2"> > <H2 STYLE="column-span: all; margin-bottom: 1em">HHHH...</H2> > <P STYLE="margin-top: 1em">PPPPPPPPP... > </DIV> > > In other words, does it look like the left or the right image? > > HHHHHHHHHHHHHHHH HHHHHHHHHHHHHHHH > HHHHHHHHHHHH HHHHHHHHHHHH > > PPPPPPP PPPPPPP PPPPPPP > PPPPPPP PPPPPPP PPPPPPP PPPPPPP > PPPPPPP PPPPPPP PPPPPPP PPPPPPP > PPPPPPP PPPPPPP PPPPPPP PPPPPPP > > I think I prefer the left image, i.e., the margins do collapse between > spanning elements and their non-spanning siblings. Yes. Text and an example to this effect should be added. -h&kon Håkon Wium Lie CTO °þe®ª howcome@opera.com http://people.opera.com/howcome
Received on Saturday, 22 May 2010 21:38:50 UTC