css3-page/Overview.src.html

changeset 7435
2fa0f76c392e
parent 7434
bdbe85bfb65b
child 7436
6ded58aacc4c
     1.1 --- a/css3-page/Overview.src.html	Mon Feb 11 14:12:53 2013 -0800
     1.2 +++ b/css3-page/Overview.src.html	Mon Feb 11 14:15:36 2013 -0800
     1.3 @@ -527,7 +527,10 @@
     1.4  a page or a margin context, the <a href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors">Rules for handling parsing errors</a>
     1.5  apply; that is, valid declarations within the block are applied.</p>
     1.6  
     1.7 -<h3 id="left-right-first">Page pseudo-classes: :left, :right, and :first</h3>
     1.8 +<h3 id="pseudo-classes">
     1.9 +  <a id="left-right-first"></a>
    1.10 +  Page pseudo-classes: :left, :right, :first, and :blank
    1.11 +</h3>
    1.12  
    1.13  <p>
    1.14    When printing double-sided documents,
    1.15 @@ -591,6 +594,55 @@
    1.16  </pre>
    1.17  </div>
    1.18  
    1.19 +<p>
    1.20 +  Blank pages that appear as a result of
    1.21 +  <a href="http://www.w3.org/TR/css3-break/#forced-breaks">forced page breaks</a>
    1.22 +  can be styled with the <code>:blank</code> pseudo-class.
    1.23 +
    1.24 +<div class="example">
    1.25 +<p>In this example, forced page break may occur before <code>h1</code> elements.
    1.26 +<pre>
    1.27 +h1 { page-break-before: left }
    1.28 +
    1.29 +@page :blank {
    1.30 +  @top-center { content: "This page is intentionally left blank" }
    1.31 +}
    1.32 +</pre>
    1.33 +</div>
    1.34 +
    1.35 +<p>
    1.36 +  A page matched by <code>:blank</code> can also be matched
    1.37 +  by other page pseudo-classes.
    1.38 +
    1.39 +<div class="example">
    1.40 +
    1.41 +<p>If headers have been specified on all right pages, a blank right
    1.42 +page will be matched by both <code>:blank</code>
    1.43 +and <code>:right</code>. Therefore, margin boxes set on right pages
    1.44 +will have to be removed unless they are wanted on blank pages. Here is
    1.45 +an example where the top center header is removed from blank pages,
    1.46 +while the page number remains:
    1.47 +
    1.48 +<pre>
    1.49 +h1 { page-break-before: left }
    1.50 +
    1.51 +@page :blank {
    1.52 +  @top-center { content: none }
    1.53 +}
    1.54 +
    1.55 +@page :right {
    1.56 +  @top-center { content: "Preliminary edition" }
    1.57 +  @bottom-center { content: counter(page) }
    1.58 +}
    1.59 +</pre>
    1.60 +
    1.61 +<p>Due to the higher specificity of <code>:blank</code>
    1.62 +over <code>:right</code>, the top center header is removed even
    1.63 +if <code>content: none</code> comes before <code>content: "Preliminary
    1.64 +edition"</code>.
    1.65 +
    1.66 +</div>
    1.67 +
    1.68  <div class="note">
    1.69  <p><em><strong>Note.</strong> Future versions of CSS may include other page
    1.70  pseudo-classes.</em></p>
    1.71 @@ -638,7 +690,7 @@
    1.72       pseudo_page | IDENT pseudo_page?
    1.73       ;
    1.74  <span id="syntax-prod-pseudo-page">pseudo_page</span> :
    1.75 -     ':' [ "left" | "right" | "first" ]
    1.76 +     ':' [ "left" | "right" | "first" | "blank" ]
    1.77       ;
    1.78  
    1.79  <span id="syntax-prod-margin">page_margin_box</span> :
    1.80 @@ -709,7 +761,7 @@
    1.81  
    1.82  <ul>
    1.83    <li>if the page selector has a named page, f=1; else f=0</li>
    1.84 -  <li>if the page selector has a ':first' pseudo-class, g=1; else g=0</li>
    1.85 +  <li>if the page selector has a ':first' or ':blank' pseudo-class, g=1; else g=0</li>
    1.86    <li>if the page selector has a ':left' or ':right' pseudo-class, h=1; else h=0</li>
    1.87  </ul>
    1.88  

mercurial