page-selectors-004

Page cascade (first trumps right)

WeasyPrint

This browser

Flags
paged
Assertion
Properties specified in a :first @page context override those specified in :right @page contexts.

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 cascade (first trumps right)</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-selectors">
 7   <link rel="help" href="http://www.w3.org/TR/css3-page/#cascading-and-page-context">
 8   <meta name="flags" content="paged">
 9   <meta name="assert" content="Properties specified in a :first @page context override those specified in :right @page contexts.">
10   <style type="text/css">
11   
12   @page :first {
13     margin: 15% 50% 7% 7%;
14   }
15   @page :right {
16     margin-left: 50%
17   }
18 
19   div {
20     page-break-after: always;
21   }
22  
23   </style>
24  </head>
25  <body>
26    <div>
27    This test produces only this page, containing only this paragraph, which is entirely on the left side of the page.
28    </div>
29  </body>
30 </html>