22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Transferring one (large) page box to N x M sheets (called "tiling").<br />

Creating signatures. A signature is a group of pages printed on a sheet,<br />

which, when folded and trimmed like a book, appear in their proper<br />

sequence.<br />

Printing one document to several output trays.<br />

Outputting to a file.<br />

Although <strong>CSS2</strong> does not specify how user agents transfer page boxes to<br />

sheets, it does include certain mechanisms for telling user agents about the<br />

target sheet size and orientation [p. 177] .<br />

13.2 Page boxes: the @page rule<br />

The page box is a rectangular region that contains two areas:<br />

The page area. The page area includes the boxes laid out on that page. The<br />

edges of the page area act as the initial containing block [p. 96] for layout<br />

that occurs between page breaks.<br />

The margin area, which surrounds the page area.<br />

Note. In <strong>CSS2</strong>, the border properties [p. 88] and padding properties [p. 87] do<br />

not apply to pages; they may in the future.<br />

Authors specify the dimensions, orientation, margins, etc. of a page box within<br />

an @page rule. An @page rule consists of the keyword "@page", a page selector<br />

(followed with no intervening space by an optional page pseudo-class), and a<br />

block of declarations (said to be in the page context).<br />

The page selector specifies for which pages the declarations apply. In <strong>CSS2</strong>,<br />

page selectors may designate the first page, all left pages, all right pages, or a<br />

page with a specific name.<br />

The dimensions of the page box are set with the ’size’ property. The dimensions<br />

of the page area are the dimensions of the page box minus the margin<br />

area.<br />

Example(s):<br />

For example, the following @page rule sets the page box size to 8.5 x 11<br />

inches and creates ’2cm’ margin on all sides between the page box edge and the<br />

page area:<br />

@page { size 8.5in 11in; margin: 2cm }<br />

The ’marks’ property in an @page rule specifies crop and cross marks for the<br />

page box.<br />

13.2.1 Page margins<br />

The margin properties [p. 85] (’margin-top’, ’margin-right’, ’margin-bottom’,<br />

’margin-left’, and ’margin’) apply within the page context [p. 176] . The following<br />

diagram shows the relationships between the sheet, page box, and page<br />

margins:<br />

176

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!