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

Re: [css3-page][css3-multicol] margins at page or column breaks

From: Håkon Wium Lie <howcome@opera.com>
Date: Thu, 8 Jan 2009 20:39:50 +0100
Message-ID: <18790.22150.539162.35496@opera.com>
To: MURAKAMI Shinyu <murakami@antenna.co.jp>, "Grant, Melinda" <melinda.grant@hp.com>
Cc: www-style@w3.org

Also sprach MURAKAMI Shinyu:

 > The current css3-page[1] and css3-multicol[2] drafts say that 
 > margins will be set to zero where page or column breaks occur.

Yes. The thinking is that margins (unlike padding) is used to set
space between elements. And, if the elements are on different pages,
margins should not apply. Except that people will expect margins to
work on the first page, so therefore we only remove margins in the
breaks between pages (and columns).

 > [1] http://dev.w3.org/csswg/css3-page/#allowed-pg-brk
 >     ... When a page break occurs here, the used values of the adjoining
 >     'margin-bottom' and 'margin-top' properties are set to '0'.

The quote is :

  In the normal flow, page breaks may occur at the following places:

    In the vertical margin between sibling block boxes (or rows in a
    table). When a page break occurs here...

I wonder if the word "sibling" should be removed. For example, a page
break should be allowed before and after the P element:

   <div>...<p>....</p>...</div>

 > [2] http://dev.w3.org/csswg/css3-multicol/#column0
 >     Because the rules for column breaks are similar to rules for page
 >     breaks, margins will be set to zero where column breaks occur.

Yes.

 > I have some questions here:
 > 
 > 1. Margins at beginning of document will be set to zero?

No. Arguably, this is inconsistent, but I belive authors will not
understand why margins don't work on the first element they try it on.

 > 2. Margins at forced page breaks will be set to zero?

According to the spec, yes. (But I vaguely recall discussing this and
reaching a different answer? Melinda? It could be argued that pages
after forced page breaks should be treated like the first page.)

 > 3. Margins at beginning of multi-column content will be set to zero?

No.

 > 4. Margins at forced column breaks (or forced page breaks in
 >    multi-column content) will be set to zero?

According to the spec, yes.

 > I examined some existing implementations with the attached test files:
 > margin-at-break.html -- for test 1 and 2
 > margin-at-break-multicol.html -- for test 3 and 4
 > 
 > implementations:
 > Firefox 3.1 Beta 2
 > Safari 3.2.1
 > Prince 6.0r7
 > PDFreactor 3.0.3311
 >
 > test results:
 > 
 > 1. Margins at beginning of document will be set to zero?
 > Firefox=No
 > Safari=No
 > Prince=No
 > PDFreactor=Yes

Good, almost all correct.

 > 2. Margins at forced page breaks will be set to zero?
 > Firefox=Yes
 > Safari=Yes
 > Prince=No
 > PDFreactor=Yes

The easiest would be to say Yes.

 > 3. Margins at beginning of multi-column content will be set to zero?
 > Firefox=Yes
 > Safari=No
 > Prince=Yes
 > PDFreactor=? (multi-column not yet supported)

This should definitely be yes.

 > 4. Margins at forced column breaks (or forced page breaks in
 >    multi-column content) will be set to zero?
 > Firefox=Yes
 > Safari=? (forced column breaks not yet supported?)
 > Prince=Yes
 > PDFreactor=? (multi-column not yet supported)

The easiest would be to say Yes.

What do you think it should be?

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Thursday, 8 January 2009 19:40:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT