background-root-020

Background: Test Seventeen

WeasyPrint

This browser

Assertion
Rules governing visual formating of block level non-replaced elements and calculations of height apply to the document root element just as to any other element. Document root element should not stretch vertically to fit the viewport; document root element should only be as tall as required to enclose its content.

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: Background: Test Seventeen</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/background/17.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/colors.html#background">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#Computing_heights_and_margins">
 9   <meta name="assert" content="Rules governing visual formating of block level non-replaced elements and calculations of height apply to the document root element just as to any other element. Document root element should not stretch vertically to fit the viewport; document root element should only be as tall as required to enclose its content.">
10   <meta name="flags" content="">
11 <style type="text/css">
12    body, html { background: green; border: lime 1em solid; margin: 1em; padding: 1em; color: yellow; }
13    :link, :visited { color: inherit; background: transparent; }
14    * { margin: 1em; padding: 1em; text-align: justify; }
15 </style>
16 
17 </head>
18 <body>
19 
20   <p>Test is passed if this paragraph has two thick bright green borders surrounding it
21     and if the background of the whole page is green. The box formed by the outer
22     bright green border should not become taller (or smaller) if the window height is
23     increased or maximized (or decreased): its sides should be approximately
24     equidistant from the edges of this text.</p>
25 
26 </body>
27 </html>