Re: Questions about 'column-span'

Håkon Wium Lie <howcome@opera.com> wrote on 2010/05/23 6:38:13
> Bert Bos wrote:

 > > (1) Are there any implementations of this property yet?  My own vote

Antenna House Formatter already supports the 'column-span' property.
http://www.antennahouse.com/CSSInfo/css_reference.html

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


I prefer the left image, but I don't think the margins should collapse
between spanning elements and their non-spanning siblings.
I think the margins of spanning elements should be kept and
the margins of non-spanning siblings should be discarded.

The columns after the spanning block should be formatted as like 
beginning of a multicol block since it is natural the results of the
following two examples look alike.

  <div style="column-count: 2">
    <h2 style="column-span: all">HHHHHHHHHHHHHHHH</h2>
    <p>PPPPPPPPPPPPPPPP ...</p>
  </div>


  <h2>HHHHHHHHHHHHHHHH</h2>
  <div style="column-count: 2">
    <p>PPPPPPPPPPPPPPPP ...</p>
  </div>

I propose the following rules about margins in multi-column context:

Margins at beginning of a column and at ending of a column are
discarded, even if they are at beginning of a page, or immediately
after a forced page/column break, or immediately after a spanning
block.
(the current css3-multicol spec "... However, the margin 
immediately after a forced page/column break will be preserved."
have to be changed.)

We discussed in Tokyo 2009 F2F about the 'margin-break' property.
http://lists.w3.org/Archives/Public/www-style/2009Mar/0065.html

This property will be defined as following:

Name:       margin-break
Value:      [ auto | discard | keep ] keep?
Initial:    auto
Applies to: block elements
Inherited:  no

discard
   Margins at beginning of a page or beginning of a column
   are discarded.

keep
   Margins at beginning of a page or beginning of a column
   are kept if specified as the first value.
   Margins at ending of a page or ending of a column
   are kept if specified as the second value.

   If the second value is omitted, margins at ending of a page
   or ending of a column are discarded.

auto
   Same as 'keep' at beginning a document or after a forced
   page break, except in multi-column context.
   Otherwise same as 'discard'.

   Note: in multi-column context, 'auto' is always same as
   'discard'.

   Note: margins of spanning elements (column-span: all) are
   always kept and do not collapse with margins of non-spanning
   elements.


Antenna House Formatter has implemented this as '-ah-margin-break'
property.

Best regards,

-- 
村上 真雄 (MURAKAMI Shinyu)
http://twitter.com/MurakamiShinyu
Antenna House Formatter:
http://www.antenna.co.jp/AHF/
http://www.antennahouse.com

Received on Sunday, 23 May 2010 14:14:40 UTC