| <!doctype html> |
| <html> |
| <head> |
| <style type="text/css"> |
| @page :visited { /* :visited is invalid for @page */ |
| color: red; |
| } |
| @page a_page_name:visited { /* :visited is invalid for @page */ |
| background-color: red; |
| } |
| |
| @page { |
| margin-top:5cm; |
| margin-bottom:10cm; |
| } |
| @page :left { |
| margin-right:3cm; |
| } |
| @page :right { |
| margin-left:3cm; |
| } |
| @page :first { |
| border-width:1px; |
| } |
| @page hello { |
| color:green; |
| } |
| @page world:right { |
| background-color:green; |
| } |
| @media print { |
| @page somepage:first { |
| margin:3cm; |
| } |
| } |
| @page auto_page { |
| size: auto; |
| } |
| @page square_page { |
| size: 4in; |
| } |
| @page letter_page { |
| size: letter; |
| } |
| @page page_widht_height { |
| size: 10cm 15cm; |
| } |
| @page page_size_orientation { |
| size: ledger landscape; |
| } |
| @page page_orientation_size { |
| size: portrait a4; |
| } |
| @page err_empty_size { |
| size:; |
| } |
| @page err_unknow_page_size { |
| size: yotsugiri; |
| } |
| @page err_length_and_page_size { |
| size: 10cm letter; |
| } |
| @page err_length_and_orientation { |
| size: 10cm landscape; |
| } |
| @page err_orientations { |
| size: portrait landscape; |
| } |
| @page err_too_many_params { |
| size: a5 landscape auto; |
| } |
| |
| table { |
| page: Rotated; |
| } |
| div { |
| page: Auto; |
| } |
| pre { |
| page: Auto Rotated; /* Invalid */ |
| } |
| p { |
| page: 1cm; /* Invalid */ |
| } |
| |
| /* FIXME: Add the following once margin at-rule is implemented. |
| |
| @page :first { |
| @top-left-corner { |
| content:"TLC"; |
| } |
| @bottom-center { |
| content:"BC"; |
| } |
| } |
| */ |
| </style> |
| <script type="text/javascript"> |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| function print(str) |
| { |
| document.getElementById("output").innerHTML += str; |
| } |
| |
| function printCssTextOfPageRules() |
| { |
| var ss = document.styleSheets; |
| for (var i = 0; i < ss.length; i++) { |
| for (var j = 0; j < ss[i].cssRules.length; j++) { |
| print(ss[i].cssRules[j].cssText + "<br/>"); |
| } |
| } |
| } |
| |
| </script> |
| </head> |
| <body onload="printCssTextOfPageRules();"> |
| <div id="output"></div> |
| </body> |
| </html> |
| |