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

fantasai <> 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."
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.

Shinyu Murakami
Antenna House Formatter

Received on Monday, 9 March 2009 10:31:49 UTC