Chapter 10 - Visual formatting model details - 10.6 Calculating heights and margins
Go to the relevant page of the specification.
Background: Test Seventeen
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.
Placing the root element