Skip to content

Commit 40242ec

Browse files
committed
spec/page-view: [Proposals]
1 parent b718229 commit 40242ec

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

spec/page-view.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,27 @@ The design can be implemented like this:
277277
<div class="story"></div>
278278
</div>
279279
</code>
280+
281+
===[css3-regions] with [css3-page]===
282+
[css3-page] already has the concept of different pages having boxes of variable content and style depending on their order, and on certain elements triggering different @page layouts: margin boxes. Margin boxes are created by margin at-rules inside the page context. Margin boxes can accept a subset of CSS properties, just as Regions do. So, in the same way that margin boxes are declared using @margin inside different named or pseudo-classed @page rules, other boxes //within// the "page area" would be created using @slot inside different named or pseudo-classed @page rules. Each @slot could have a 'flow-from' property or 'content' property to give it contents. 'flow-from' makes the @slot into a region. When it there is more content that will fit, it flows to the next region that can contain it, even if that region is on another page. If a page break or 'page' property in another element results in another @page being used that does not contain a region for this flow, then the flow is deferred to a subsequent page that does accept this flow.
283+
284+
<code>
285+
286+
HTML, body { height:100%; margin:0; }
287+
body { overflow: paged; }
288+
@page {
289+
@slot(0) { flow-from: article-flow; ... }
290+
@slot(1) { flow-from: sidebar-flow; ... }
291+
}
292+
@page chapter-start-page {
293+
@slot(0) { flow-from: article-flow; ... }
294+
@slot(Logo) { content:url(logo.png); position:absolute; top:0; right:0; .. }
295+
}
296+
297+
article { flow-into: article-flow; }
298+
aside { flow-into: sidebar-flow; }
299+
article h1 { page-break-before: always; page: chapter-start-page; }
300+
</code>
280301
====Ideas====
281302
//Is it possible to achieve same results with further extensions of 'overflow:paged' and using pseudo-elements?//
282303

0 commit comments

Comments
 (0)