Closed
Bug 851441
Opened 12 years ago
Closed 3 years ago
[css3-page] implement @page rule size attribute
Categories
(Core :: CSS Parsing and Computation, enhancement, P1)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
Webcompat Priority | P1 |
People
(Reporter: teoli, Assigned: alaskanemily)
References
(Blocks 7 open bugs, )
Details
(5 keywords, Whiteboard: [DevRel:P3][layout:backlog][print2020])
CSS Paged Media Level 3 define the size attribute that allows to define the orientation of a page when printing it.
@page{
size:landscape;
}
or (default value)
@page{
size:portrait;
}
I'm cc/ Brendan as I'm wondering if fixing this is necessary to fix some pdf.js bugs like bug 844090 .
Finally, it looks (but I weren't able to confirm/infirm it) that WebKit implement this property unprefixed.
Comment 1•12 years ago
|
||
(In reply to Jean-Yves Perrier [:teoli] from comment #0)
>
> Finally, it looks (but I weren't able to confirm/infirm it) that WebKit
> implement this property unprefixed.
It is un-prefixed, at least on Chrome 27.0.1438.7 dev / OS X 10.8.3.
(Note that, on OS X, it only works inside Chrome's own print-dialog. The OS X print dialog settings override it, tested both in Chrome and Webkit nightly. It is not unexpected - user setting)
Comment 2•12 years ago
|
||
Jean-Yves,
Consider these as suggestions.
1-
bug 137367 comment 8 suggests to set this kind of bug report's component field to Printing: Output and not Style System (CSS)
2-
You can expect some people to search for this bug with the string "@page" and/or with "size: landscape" (with a blank space separating the 2 words). CSS3 Paged Media may have better chances to be used for searching since the spec uses "Paged Media" and bug 286443 uses such terminology. And bug 286443 should definitely be a meta type of bug report.
So, I suggest the following as new summary:
[CSS3 Paged Media] Support for @page { size: landscape }
3-
Maybe add testcase-wanted keyword; I would.
Gérard
Comment 3•12 years ago
|
||
Are you only considering supporting 'landscape' and 'portrait'?
I'd love to enable native printing for Firefox in Google Docs (to print directly and not have to generate PDF server-side). But the lack of 'size' prevents that.
We set rules like size: 8.5in 11in; or pixel-sized rules, since we allow adjustment of page size and need precise control over how the page is printed. These values are specified for the property: http://www.w3.org/TR/css3-page/#page-size-prop
@philippe, the OS dialog doesn't respect the size property, although it's possible to use @media queries together with @page to target different page size targets. See: http://www.w3.org/TR/css3-page/#page-size-media-query
-Fil
Comment 4•12 years ago
|
||
> Are you only considering supporting 'landscape' and 'portrait'?
This bug 851441 report is only about supporting
@page {size: landscape }
where landscape is a reserved keyword.
> I'd love to enable native printing for Firefox in Google Docs (to print
> directly and not have to generate PDF server-side). But the lack of 'size'
> prevents that.
>
> We set rules like size: 8.5in 11in; or pixel-sized rules, since we allow
> adjustment of page size and need precise control over how the page is
> printed. These values are specified for the property:
> http://www.w3.org/TR/css3-page/#page-size-prop
Fil, if you want to help, you can be helpful here: please create another bug report for this.
Give it the summary:
[CSS3 Paged Media] Support for @page { size: <page-size> } (eg. size: 4in 6in)
and make it blocking bug 286443 and Component field should be Printing: Output
How to Write a Proper Bug
https://quality.mozilla.org/docs/bugzilla/starter-kit/how-to-write-a-proper-bug/
Bug writing guidelines
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines
Gérard
Comment 5•11 years ago
|
||
> please create another bug report for this.
Bug 851937: [CSS3 Paged Media] Support for @page size
has been created for this.
Comment 6•11 years ago
|
||
Does this block or depend on bug #851937?
Comment 7•11 years ago
|
||
Yes, I'd say this bug blocks bug 851937.
We created this bug 851441 because several people in another bug report (can't find which now) were strongly requesting support for @page {size: landscape }.
Blocks: 851937
Comment 8•11 years ago
|
||
> We created this bug 851441 because several people in another bug report
> (can't find which now)
bug 115199 comment #141
> were strongly requesting support for @page {size:
> landscape }.
Comment 11•10 years ago
|
||
Any news about this issue guys? :)
Comment 12•10 years ago
|
||
Note that CSS.supports('size', 'landscape'); and @supports incorrectly reports support for the size property. CSS.supports('size', 'bogus') correctly returns false, so somehow Firefox's CSS parser recognizes this property. Why is the property parsed but not used?
Comment 13•10 years ago
|
||
It's not clear to me whether @page-specific properties like size should be handled by @supports and CSS.supports() even if we implemented support for them. We currently parse and expose these properties on regular declarations, like |p { size: landscape; }| and again I'm not sure whether that's correct. I've asked here about that:
https://lists.w3.org/Archives/Public/www-style/2015Mar/0387.html
We have parsed marks, orphans, size and widows for a long time, without actual support for their behaviour. I don't know why that is.
Comment 14•10 years ago
|
||
In the very early days of Gecko, all the properties in CSS 2 were added at the style system level. The print-specific ones are the only ones that we haven't taken out. (Basically everything that's CSS_PROP_BACKENDONLY, plus any @page stuff.) We should fix it, but just never got around to it.
Updated•10 years ago
|
Keywords: DevAdvocacy
Updated•9 years ago
|
Summary: [CSS-Page Level 3]Implement the size: property (ability to define 'landscape' for printing) → [css3-page] implement @page { size: portrait | landscape }
Updated•9 years ago
|
Whiteboard: [parity-webkit] → [parity-webkit][DevRel:P2]
Updated•8 years ago
|
Flags: platform-rel?
Updated•8 years ago
|
platform-rel: --- → ?
Updated•8 years ago
|
Whiteboard: [parity-webkit][DevRel:P2] → [parity-webkit][DevRel:P3]
Updated•8 years ago
|
platform-rel: ? → ---
Updated•8 years ago
|
Comment 15•8 years ago
|
||
Keywords: testcase
Comment 16•8 years ago
|
||
> Simple test:
> http://www.gtalbot.org/BugzillaSection/Bug1363148-page-size-landscape.html
Argh... got confused with bug number. Please use instead:
size: landscape
http://www.gtalbot.org/BugzillaSection/Bug851441-page-size-landscape.html
3 additional tests:
size: 4in 6in landscape
http://www.gtalbot.org/BugzillaSection/Bug851441-page-size-landscape-002.html
size: letter landscape
http://www.gtalbot.org/BugzillaSection/Bug851441-page-size-landscape-003.html
size: legal landscape
http://www.gtalbot.org/BugzillaSection/Bug851441-page-size-landscape-004.html
Chrome 58 does not pass Bug851441-page-size-landscape-002 but passes the other 3 tests.
Comment 17•8 years ago
|
||
I am removing page-size-landscape-002 (size: 4in 6in landscape) because it uses invalid syntax.
Value: <length>{1,2} | auto | [ <page-size> || [ portrait | landscape] ]
means that portrait or landscape can only be added alongside of one of page-size reserved keywords.
Comment 18•7 years ago
|
||
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-safari
Whiteboard: [parity-webkit][DevRel:P3] → [DevRel:P3]
Updated•6 years ago
|
Whiteboard: [DevRel:P3] → [DevRel:P3][layout:backlog]
Updated•5 years ago
|
Whiteboard: [DevRel:P3][layout:backlog] → [DevRel:P3][layout:backlog:2020]
Updated•5 years ago
|
Whiteboard: [DevRel:P3][layout:backlog:2020] → [print2020]
Updated•5 years ago
|
Whiteboard: [print2020] → [DevRel:P3][layout:backlog:2020][print2020]
Updated•5 years ago
|
Updated•5 years ago
|
Comment 19•4 years ago
|
||
Now that we triage by severity, setting priority to P1 to reflect backlog prioritization on this bug as either in-progress, or planned development in the near term. See https://wiki.mozilla.org/Platform/Layout#Backlog_Tracking_in_Bugzilla
Priority: -- → P1
Updated•4 years ago
|
Assignee: nobody → emcdonough
Status: NEW → ASSIGNED
Comment 20•4 years ago
|
||
[print2020_v79] here means that this is being worked on in the v79 timescale, not that it is expected to be completed for v79.
Whiteboard: [DevRel:P3][layout:backlog:2020][print2020] → [DevRel:P3][layout:backlog:2020][print2020_v79]
Assignee | ||
Updated•4 years ago
|
Summary: [css3-page] implement @page { size: portrait | landscape } → [css3-page] implement @page rule size attribute
Updated•4 years ago
|
Whiteboard: [DevRel:P3][layout:backlog:2020][print2020_v79] → [DevRel:P3][layout:backlog:2020][print2020_v80]
Updated•4 years ago
|
Whiteboard: [DevRel:P3][layout:backlog:2020][print2020_v80] → [DevRel:P3][layout:backlog][print2020]
Comment hidden (advocacy) |
Updated•4 years ago
|
Webcompat Priority: --- → P1
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox94:
wontfix → ---
status-firefox95:
fixed → ---
status-firefox-esr91:
wontfix → ---
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•