page-grammar-002

@page grammar: white space not required around pseudo

WeasyPrint

This browser

Flags
paged
Assertion
White space before and after a pseudo-page selector is not required.

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 grammar: white space not required around pseudo</title>
 5   <link rel="author" title="Melinda Grant" href="mailto:melinda.grant@hp.com">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-box">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/grammar.html#grammar">
 8   <link rel="help" href="http://www.w3.org/TR/css3-page/#syntax-page-selector">
 9   <meta name="flags" content="paged">
10   <meta name="assert" content="White space before and after a pseudo-page selector is not required.">
11   <style type="text/css">
12     @page {
13       margin: 10%;    /* This makes the header big enough to hold the file name when printed on 4x6 in media. */
14     }
15     @page:right{
16       margin-left: 50%;
17     }
18     @page:left{
19       margin-right: 50%;
20     }
21     html {
22       page-break-before: right;
23     }
24     p {
25       padding: 0.5em;
26       border: solid blue;
27       page-break-after: always;
28     }
29    </style>
30  </head>
31  <body>
32   <p>This test produces two pages of output on paged media.  This box must be entirely on the right half of the page.
33   </p>
34   <p>This box must be on a new page and entirely on the left half of the page.
35   </p>
36  </body>
37 </html>