W3C home > Mailing lists > Public > www-style@w3.org > March 2005

[CSS21] Absolute positioning

From: Grant, Melinda <melinda.grant@hp.com>
Date: Tue, 1 Mar 2005 20:41:23 -0800
Message-ID: <3F6865DB7477EF4A8F79ABCB18DC7E5BBC9C87@cacexc06.americas.cpqcorp.net>
To: <www-style@w3.org>


I'd like to propose a change to Section 10.1 of CSS 2.1. [1]

The current specification essentially requires a printer to buffer the entire document before committing any pages to print.  ("In paged media, an absolutely positioned element is positioned relative to its containing block ignoring any page breaks (as if the document were continuous). The element may subsequently be broken over several pages.")  It's the 'ignoring any page breaks' verbiage that's problematic.

I understand the intent to be that printed documents look as much as possible like their screen-displayed counterparts.

But the implication of course is that if there's no positioned ancestor, the position is relative to the top of the  first page for 'top', and one might think relative to the bottom of the last page for 'bottom'.  But browsers implement 'bottom' relative to the viewport (the initial containing block), which, in printing equivalence, puts it back relative to the page box of the first page.  So the whole document must be parsed before determining what content to commit to the first page.  This implies all content must be stored within the printer until the first page has been printed, or multiple parsing passes must be made.

I suggest that requirement be modified to something less costly to implement.  Most printers will simply not be able to buffer the entire document.

An escape clause something like...

"For absolutely positioned content that resolves to a position on a page other than the page being laid out (the current page), or resolves to a position on the current page which has already been rendered for printing, printers may place the content on the current page, in another convenient location or may omit it."

... would give printers an out, and hopefully flag the issue for document authors to consider.  Alternatively, changing the sentence in question from "... is positioned" to "...should be positioned" would leave room for compliant printers that don't cost mega bucks.

Best regards,

Melinda

[1] http://www.w3.org/TR/CSS21/visudet.html#containing-block-details
Received on Wednesday, 2 March 2005 04:41:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:36 GMT