FW: [css3-page] Page area changes within a document

I agree with the intent of concept of element adapting to page size change. The primary scenario as I understand it looks like this:

table { page: landscape; }

at this point, if no other sizing properties are involved, the table’s available width should be the page width. The rule that an element going across pages, should adapt to changing width is one way to assure that.

If an element “adapts” to page change, I believe it means this:

·         Page box changes – background, border, shadow

·         For descendant elements, parent size and position depends on what page the child element is at (which could be the page at which element starts, the page currently calculated, or perhaps the page of element’s static position)

·         Text content reflows into current page width, including positioning of floats and absolute-positioned content that continues from previous page(s).

I am sure it is possible to produce a complete set of layout algorithms that produce good results with all these constraints, but I think we should be very careful about mandating details until there is a solid implementation (ideally including other complex page properties, as page floats, columns, footnotes).

For the sake of making progress, I would be fine with a recommendation that makes known use cases work, at a “should” level rather than “must” – which is I believe what we resolved at f2f

Alex

From: "Grant, Melinda" <melinda.grant@hp.com<mailto:melinda.grant@hp.com>>
Date: October 23, 2008 2:47:38 AM GMT+02:00
To: Alex Mogilevsky <alexmog@microsoft.com<mailto:alexmog@microsoft.com>>, "www-style@w3.org<mailto:www-style@w3.org>" <www-style@w3.org<mailto:www-style@w3.org>>
Subject: RE: [css3-page] Page area changes within a document

Alex said:
Melinda said:
I propose to add the following (probably in a new sub-section 4.4):
      "Each page in turn is laid out as if the initial containing block were the same size as its page area."

CSS 2.1 has this text in 13.2.2:
“Margin declarations on left, right, and first pages may result in different page area <http://www.w3.org/TR/CSS21/page.html#page-area>  widths. To simplify implementations, user agents
may use a single page area width on left, right, and first pages. In this case, the page area width of the first page
should be used. “

That leaves layout across different page sizes intentionally undefined. We’ll not change that for 2.1, right?

Right.

- Changing an element’s width on different pages may work for text flow, but it definitely doesn’t work for a table.

Yes, we should except tables.  (Although I don't necessarily see that it 'definitely doesn't work', I agree it could be really ugly. ;-) There may be other things we want to call out as undefined as well.)

- An image with width:50% split across pages really shouldn’t have different scale on different pages

This example as I understand it doesn't make sense to me.  I think we have general agreement that content to the left or right of the page box is omitted when printing; at least the spec allows it to be discarded. And I believe we recently agreed to add verbiage to 13.3.5 to the effect that breaking inside images is to be avoided.  There are aberrant cases with printing images though --  say the image height is 110% of page height. Even with a page break before, the image will never fit a page.  In those cases, we don't spec the behavior. I certainly agree that it's not important that the remainder of the image be rescaled to the new page area size.

I think it is still fine to have examples of content that adapts to variable page width but it should remain optional.
What do you think we should mandate?  (It's not just the variable width that has implications: height changes needs to be taken into account too.)  Or are you suggesting we leave it as it is for css2.1 in css3 as well?  I think that would be unfortunate.

[I note the f2f irc log includes a discussion where use cases for this were felt to be very rare or unusual. Use cases I think we should be sure to enable include a first page with different styling (margins, borders, etc.) and, similarly, different styling for right and left pages. For instance, I might want an extra-wide left margin on the first page of my document.  I might want to put a wide right border with a nice border image on every right page...]

Best wishes,

Melinda

Received on Sunday, 26 October 2008 10:35:21 UTC