W3C home > Mailing lists > Public > www-style@w3.org > August 2007

RE: [CSS3 Page] Comments on CSS3 Paged Media (II)

From: Alex Mogilevsky <alexmog@exchange.microsoft.com>
Date: Wed, 22 Aug 2007 23:44:00 -0700
To: fantasai <fantasai.lists@inkedblade.net>, "Grant, Melinda" <melinda.grant@hp.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <04F36FB4ED0F85459AA447F72711526FF5E3E5B6AD@DF-GRTDANE-MSG.exchange.corp.microsoft.com>

Fantasai wrote:

> >> Using named pages
> >>
> >>    What happens in the following example
> >>      <div>
> >>        <p>...</p>
> >>      </div>
> >>      <div>
> >>        <p>...</p>
> >>      </div>
> I don't think it's clear what happens in this case if I put borders on
> all four elements. Where are the page breaks and how do you know? If
> the
> content-empty page suppression is what's keeping me from getting blank
> pages, do the divs' top borders not get rendered because they are on
> empty
> pages?

I agree with Melinda's answer that the divs don't generated empty pages. If they did it wouldn't be welcomed by pretty much anyone.

It will also make the best user experience if borders close around actual content. That would mean the behavior is somewhat similar to margin collapsing - no new pages until non-empty content is present... I really wouldn't want to create something as complicated as margin collapsing, but so far it seems doable, at least not more complicated.

So, would it be reasonable to say "rules that modify page properties come in effect when non-empty content is encountered"? Then clearly any number of nested blocks with specified page breaks or named pages accumulate changes until some non-empty content is found. And there is never a lost top border...

> >> Forced page breaks
> >> ------------------
> >>
> >>    It does not appear to be defined whether in
> >>      <div></div>
> >>      <p></p>
> >>    with
>        div { page-break-after: left; }
>        p { page-break-before: always; }
>      or
>        div { page-break-after: left; }
>        p { page-break-before: right; }
> >>    the P's contents are required to appear on a left page, right
> >>    page, or any page.

By the same logic, none of the above - the paragraph doesn't have any content, so it depends on what comes after.

Assuming the next non-empty block doesn't have any page rules, its page side is the accumulated set of properties from previous elements (left in the first case, right in second).

Does that sound reasonable?

Received on Thursday, 23 August 2007 06:44:20 GMT

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