page-break-inside-005

page-break-inside inheritance

WeasyPrint

This browser

Flags
paged
Assertion
'page-break-inside' does not inherit.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: page-break-inside inheritance</title>
 5   <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/text.html#spacing-props">
 7   <meta name="flags" content="paged">
 8   <meta name="assert" content="'page-break-inside' does not inherit.">
 9   <style type="text/css">
10     /* Most permissible breaking possible */
11     * { widows: 1; orphans: 1; widows: 0; orphans: 0; }
12 
13     /* Leave 2.5 lines at bottom to play with, independent of page size. */
14     html, body {
15       height: 100%;
16       line-height: 1;
17     }
18     .spacer1 {
19       height: 35%;
20     }
21     .spacer2 {
22       height: 15%;
23       margin-top: -2.5em;
24     }
25 
26     .avoid {
27       page-break-inside: avoid;
28       height: 200%;
29     }
30     .test div {
31       white-space: pre;
32       /* Make test text more visible */
33       color: blue;
34       font-weight: bold;
35     }
36 </style>
37 </head>
38 <body>
39   <div class="avoid">
40    <div class="spacer1">This test requires 2 pages. Lines A and B must appear
41      on the first page, lines C and D on the second.</div>
42    <div class="spacer2"></div>
43    <div class="test">
44 <div>    Page 1 Line A
45     Page 1 Line B
46     Page 2 Line C</div>
47 <div>    Page 2 Line D</div>
48    </div>
49   </div>
50 </body>
51 </html>