Page and media rules suggestion

I don't see a reason why @page rules cannot be contained in @media rules
(at least the grammar says so, I didn't find it explicitly in the text).
@page rules apply to all paged media types (mentioned in CSS2 are
emboss, print, projection, and tv), but often not all declarations
should apply to all of these media (for example, setting a margin of 3
cm for printing at the moment also sets it for TVs, where that might not
be senseful).
To make a set of rules apply only to a special of these media, you have
to put them in a seperate stylesheet, and import it via e.g.
@import "print.css" print;
which is clumsy because you have to create some stylesheets which might
contain only a few bytes.

So my suggestion:
allow @page to be contained in @media (it really should not be a
problem).
@media print
{
    @page { margin:3cm; size:landscape }
    h1 { page-break-after:avoid }
}

Christian Kaufhold

Received on Sunday, 1 November 1998 14:27:00 UTC