- From: MURAKAMI Shinyu <murakami@antenna.co.jp>
- Date: Mon, 09 Mar 2009 19:30:49 +0900
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: robert@ocallahan.org, www-style@w3.org, Hakon Wium Lie <howcome@opera.com>
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.
--
Shinyu Murakami
http://www.antennahouse.com
Antenna House Formatter
http://www.antenna.co.jp/AHF/en/
Received on Monday, 9 March 2009 10:31:49 UTC