[css3-page] implement @page { size: <length>{1,2} | <page-size> }

NEW
Unassigned

Status

()

6 years ago
11 months ago

People

(Reporter: bugzilla, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 4 bugs, {css3, dev-doc-needed, testcase-wanted})

Trunk
css3, dev-doc-needed, testcase-wanted
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
Specification
8.1. Page size: the 'size' property
http://www.w3.org/TR/css3-page/#page-size-prop
"
Name: 	size
Value: 	<length>{1,2} | auto | [ <page-size> || [ portrait | landscape] ] 

This property specifies the target size and orientation of the page box's containing block. In the general case, where one page box is rendered onto one page sheet, the 'size' property also indicates the size of the destination page sheet. 
"

Examples of @page's size usage:

size: <length>{1,2}
@page {size: 4in 6in;} /* 4 inches wide by 6 inches high in default portrait orientation */

size: <page-size>
@page {size: letter;} /* 8.5 inches wide by 11 inches high in default portrait orientation */

size: <page-size>
@page {size: A4;} /* 297mm wide by 210mm high in default portrait orientation */

size: <page-size>
@page {size: legal;} /* 8.5 inches wide by 14 inches high in default portrait orientation */
Duplicate of this bug: 884690

Comment 2

5 years ago
Does this block or depend on bug #851441?
(Reporter)

Updated

5 years ago
Depends on: 851441

Updated

5 years ago
Blocks: 911804

Updated

5 years ago
Blocks: 947125
any news for this?
I don't understand what this feature is supposed to do.  How does it interact with a printer having only particular sizes of paper, and the user having chosen one of those sizes already?
Summary: [CSS3 Paged Media] Support for @page size → [css3-page] implement @page { size: <length>{1,2} | <page-size> }
Take as example a Shower.js presentation example (http://pepelsbey.net/pres/clear-and-sharp/), they use the size for set the dimension of the print page.
If you open the site on Chrome you can see a full page in printing but in Firefox have a wrong layout.

Comment 6

11 months ago
Even simply adding support for the `[ portrait | landscape ]` portion of this spec would go a long way for fixing developer headaches with printing in Firefox. I don't even care if the user is able to change the orientation of the page afterward in the print dialog, I just want the intended orientation to be preselected when the print dialog pops up.
You need to log in before you can comment on or make changes to this bug.