W3C home > Mailing lists > Public > www-style@w3.org > November 1998

Page and media rules suggestion

From: Christian Kaufhold <chka@uni-bremen.de>
Date: Sun, 1 Nov 1998 20:27:33 +0100
Message-ID: <00e701be05cd$fbe0c980$53066686@standard>
To: <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:56 GMT