Re: [CSSWG] Minutes and Resolutions Tokyo F2F Thurs: Page Breaking, GCPM, Image-Resolution, Multicol

On Mon, Mar 9, 2009 at 11:30 PM, MURAKAMI Shinyu <murakami@antenna.co.jp>wrote:

> fantasai <fantasai.lists@inkedblade.net> wrote on 2009/03/09 18:44:40
> > Robert O'Callahan wrote:
> > >
> > > This is unfortunate; it means you can no longer add column styles to
> the
> > > <div> in markup like this
> > > <div>
> > >   <p>...
> > >   <p>...
> > >   <p>...
> > > </div>
> > > and have it look good in browsers that support columns and browsers
> that
> > > don't :-(. That's the very reason I implemented margin collapsing
> across
> > > the column set boundary in the first place.
>
> We can add column styles as:
>
> div {
>  column-count: 2;
>  margin-top: 1.12em;
>  margin-bottom: 1.12em;
> }
>
> and the margin-top of the first p and the margin-bottom of the last p
> inside the multi-column will be discarded(*). The result will be same as
> if the collapsing is done. UAs that don't support multi-column will
> treat the div as normal block and no problem also.
>
> (*) The wording in the current spec seems not very clear:
> "Also, margins will be set to zero around column breaks, just like for
> page breaks."
> http://dev.w3.org/csswg/css3-multicol/#column-breaks
> I think "around column breaks" includes beginning and end of the
> multi-column element, and not just like for page the margin-top should
> be discarded even though forcing breaks.
>

That works if you know what the column contents' margin-top and
margin-bottom are going to be. In this case you have to guess that the UA
sheet has about 1em top and bottom margins for <p> (or set margins on <p>
manually). More complicated situations would be difficult or impossible to
handle. But I guess this might be OK in practice. We can wait and see.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]

Received on Monday, 9 March 2009 10:47:40 UTC