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

Re: [css3-gcpm] Re: conditional floats on paged media

From: Liam R E Quin <liam@w3.org>
Date: Fri, 17 Aug 2012 22:18:28 -0400
To: Håkon Wium Lie <howcome@opera.com>
Cc: Peter Moulder <peter.moulder@monash.edu>, www-style@w3.org, Michel Onoff <michel.onoff@web.de>
Message-ID: <1345256308.30195.171.camel@localhost.localdomain>
On Thu, 2012-08-16 at 18:15 +0200, Håkon Wium Lie wrote:
>  is there a need to say "if this figure
> doesn't fit on the current page, move it to the bottom of the next
> page".

Yes, in the case that publication rules say all figures are to be
floated to the bottom of their page.

>  > The one-or-two line restriction is related to widow and orphan control,
>  > and should be considered separately from floats. Yes, they're 100%
>  > orthogonal (although yes they interact).
> Are you saying the we should not consider this to be floating?
> That the current widows/orphans properties should (be extended to)
> describe this?

If you have a rule that you don't want a single line of text (say), but
only two or more, in your paragraph, then you probably don't want
floated figures to cause a paragraph break that leaves only one line of

> I think people want it. And I've tried to spec TOC generation in CSS
> in the past:
>   http://www.w3.org/TR/2006/WD-css3-gcpm-20060612/#generated
> But it's stretching the declarative model. JavaScript seems to offer
> the required escape hatch for these cases. Or, how would you spec this
> output in CSS:

Cameron gave one possibility.

Another is to have conditional properties directly.

Cameron's suggestion might suffer from the exponential explosion of
rules also present in XSL-FO with page masters - you tend to need one
rule (or page master) for every combination of conditions... e.g.
suppose you generate "figure", "chart" or "table" depending on a class
value, so

See also table 1.6 (page 17, opposite)
See also figure 1.6 (page 18, overleaf)
See also chart 1.6 (page 16, previous page)

If you choose to put "page N" there only if the page is not the previous
or next one, now you have an extra axis to multiply your rules. Of
course, a preprocessor could help.

A declarative alternative might be a way to express alternatives based
on conditionals,

a.xref {
      /* chapter number, figure number, here, then... */,
      when(target.nextpage, "see next page")
      when(target.pagenumber = pagenumber, "(this page)")


Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
http://www.holoweb.net/~liam - the barefoot typographer
Co-author, 5th edition "Beginning XML", Wrox, July 2012
Received on Saturday, 18 August 2012 02:18:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:20 UTC