- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Thu, 08 Apr 2010 00:20:12 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- CC: www-style list <www-style@w3.org>
On 04/07/2010 09:51 AM, Tab Atkins Jr. wrote: > Hey all, Chrome Team is planning on implementing some Paged Media > features for use in a few projects. Most of their uses can be > addressed by simply implementing what CSS2.1 has to say, but there are > two specific cases where that's not adequate, and I'm not completely > sure on what I should tell them to do. > > First, they want to be able to control the page size. This is allowed > through the 'size' property on @page rules in the Paged Media spec. > Right now they're fine with just using a single size of page > throughout the document. Is it cool to just refer them to Paged Media > for this, then? Is it legitimate to, for now, go with the rule in the > spec that says implementations can ignore changes to the size of the > page area (caused either by changed in 'size' or 'margin' on @page) > and just use the page area defined for the first page if they want? The 'size' property for Paged Media is fairly stable. It's been implemented in multiple implementations and is referenced in the MIPC specifications. > Second, they want to be able to clear out the browser decorations that > get automatically put into the margin areas. Right now, the only way > I see to do that is to use the margin areas from Paged Media and > explicitly set their content to none. That is, have a setup like > this: > > @page { > @top-left-corner { content: none; } > @top-left { content: none; } > @top-center { content: none; } > @top-right { content: none; } > ... repeat 12 more times ... > } > > This is because, theoretically, the printing information is specified > in precisely that form in the UA style sheet. > > Is this the best way to do this? Can we come up with an easier way to > clear out all the margins? If not, is this section stable enough to > implement in Chrome so they *can* use this technique to clear all the > browser's decorations out? I think a generic @margin-box rule would be great, but for now, yes that's how to do it. The only part of this feature that is not stable is the at-rule grammar: whether the at-rules need to appear at the end of the @page rule (after all declarations), or whether they need to end in semicolons, or neither, or both. Again, we have multiple shipped implementations of this feature. They don't all agree on some of the details of margin box layout, but property assignment is pretty straightforward. ~fantasai
Received on Thursday, 8 April 2010 07:20:46 UTC