W3C home > Mailing lists > Public > www-style@w3.org > March 2009

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

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Mon, 9 Mar 2009 16:52:17 -0700
To: "robert@ocallahan.org" <robert@ocallahan.org>, MURAKAMI Shinyu <murakami@antenna.co.jp>
CC: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>, Hakon Wium Lie <howcome@opera.com>
Message-ID: <7C2F64B551D8664AAD94A28DAC37D0206B5EB842EC@NA-EXMSG-C103.redmond.corp.microsoft.com>
Another approach to meet the use case is to apply “top-of-page margin collapsing control” which was discussed in the past and is a likely candidate for CSS4 paged media (http://wiki.csswg.org/spec/css4-page). It logically ought to become “top-of-column margin collapsing control”, and produce the start/end behavior as Fantasai describes below.

As far as knowing the <p> margin to so that it can be replaced with proper <div> margin, IMO it is a non-issue. A multicolumn element is a solid block in page layout, so from design point of view its margins should depend on its size, border, line spacing in its main text, etc., not just what happens to be the margin of first block in the first column.

From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Robert O'Callahan
Sent: Monday, March 09, 2009 3:47 AM
Cc: fantasai; www-style@w3.org; Hakon Wium Lie
Subject: 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<mailto:murakami@antenna.co.jp>> wrote:
fantasai <fantasai.lists@inkedblade.net<mailto: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."

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.

"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 23:53:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:25 UTC