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

Re: [css3-page] Idea for simplier page-margin boxes

From: Håkon Wium Lie <howcome@opera.com>
Date: Mon, 25 Mar 2013 10:45:27 +0100
Message-ID: <20816.7351.438889.50460@gargle.gargle.HOWL>
To: robert@ocallahan.org
Cc: Simon Sapin <simon.sapin@exyr.org>, Julian Viereck <julian.viereck@googlemail.com>, www-style@w3.org
Robert O'Callahan wrote:

 > I believe this would be more like
 > @page :left div.pagenum { position: pagebox:
 >      left: 8%; top: 3%;
 >      content: counter(page) }
 > @page :right div.pagenum { position: pagebox:
 >      right: 8%; top: 3%;
 >      content: counter(page) }
 > Using positioning, you can get rid of the need to set text-align.

That's shorter. Good. But you still don't align with the page area.
And people will run into overlap/overflow issues, as we know they do
with abspos.

 > > Using abspos also creates some dependencies. In the code above, I'm
 > > guessing that the page number will fit in a box with a with of 4%
 > > (100-88-8). For page numbers, that's a reasonable guess. For other
 > > types of content, using abspos may cause overflow/overlap.
 > 
 > CSS3 Paged Media solves this by introducing what is really a new layout
 > model just for margin boxes. 

The page margin model is based on table layout. For example, from [1]

  When multiple top and bottom margin boxes are created, the five
  margin boxes at the top and bottom are each treated as if they
  formed a table with one row and five cells. The left and right
  margin boxes are treated as if they formed a table with one row and
  one cell.

  [1] http://www.w3.org/TR/2003/WD-css3-page-20030909/

So, it's been a goal to latch onto some exisiting model/code and avoid
new layout schemes. Using tables make sense, I believe, as it avoids
overlapping content.

The prose in the specification has since changed and I agree that it's
too complex. Here's my attempt at simplifying it:

  http://lists.w3.org/Archives/Public/www-style/2010Aug/0155.html

 > That is not simple. We propose to render
 > actual elements in the margin boxes, so one could use flexbox to position
 > the page number and chapter title instead of the pseudo-flexbox features in
 > CSS3 Paged Media.

Would there be a way to combine the described syntax with latching
onto flexbox (or grid, or tables)?

I don't think of the 16 names as being problematic, they just name
commonly used positions for marginalia. But one could also find ways
to create arbitrarily named margin boxes. If so, the 16 names could be
defined in an external style sheet -- much like list style types can
be defined in an external style sheet.

Going down this path, one requirement would be to position elements
wrt the page area -- I'd say that's an even more fundamental reference
than then page box.

 > > I'm not against adding abspos margin boxes for marginalia. However,
 > > I've used the current css3-page model to publish real-world books [3]
 > > and I find it simple & powerful -- not over-complicated & inadequate.
 > 
 > It's simple and powerful from the point of view of authors who want to do
 > exactly what the feature was designed to do. 

Thank you :)

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Monday, 25 March 2013 09:46:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT