Re: Calling for a massive revamp of Paged Media and GCPM

Also sprach Daniel Glazman:

 > > Again, I'd like to see code examples.
 > 
 > Here's a first one with headers, footers and footnotes.
 > 
 > http://disruptive-innovations.com/zoo/csswg/PagedMedia/pagedmedia-1.html

So, you're proposing to change this code:

  @page { @top-center { content: element(header) }}
  @page { bottom-center { content: element(footer) }}
  header { position: running(header) }
  footer { position: running(footer) }

to this code?:

  @page  {
  @slot header {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    flow-from: header-flow;
    flow-persist-across-pages: persist;
    wrap-flow: clear;
    border: thin solid black;
  }
  @slot footer {
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    height: 2em;
    flow-from: footer-flow;
    flow-persist-across-pages: normal;
    wrap-flow: clear;
    border: thin solid black;
  }}
  header { flow-into: header-flow }
  footer {  flow-into: footer-flow }

To me, it looks longer. 

Also, it wouldn't quite do the same. The margin boxes are somewhat
flexible and you can have content left, right and center without
overlap. I you're using abosolute positioning to create margin boxes,
would you achieve the same flexibility?

How would you recode this example?

  @page { @top-center { content: element(header) }}
  @page :left { @top-left { content: counter(page) }}
  @page :right { @top-right { content: counter(page) }}
  header { position: running(header) }

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Monday, 14 January 2013 19:00:51 UTC