I would like to style text font in one place so that the style definition is applied to the body element and all its children as well as header footer. Unfortunately, it seems that @page doesn’t inherit anything (at least not from body). So my question is : is there a way to define font styles in one place for every text of a document ?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>@page Font Style Inheritance</title>
<style type="text/css">
body
{
font-family : monospace;
font-size : 25pt;
color : indigo;
}
@page
{
font-family : inherit; /* Does not inherit from body */
font-size : inherit; /* Does not inherit from body */
color : inherit; /* Does not inherit from body */
@bottom-center
{
content : "page " counter( page );
}
}
</style>
</head>
<body>
<h1>@page Font Style Inheritance</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</body>
</html>