W3C home > Mailing lists > Public > www-style@w3.org > December 2008

Re: Adjusting float height on paged media

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 22 Dec 2008 16:41:41 +0200
Cc: W3C Style List <www-style@w3.org>
Message-Id: <2E3B6A92-D69A-44A1-A17E-A8D6D9A951F3@iki.fi>
To: Håkon Wium Lie <howcome@opera.com>

On Dec 22, 2008, at 15:50, Håkon Wium Lie wrote:

> The editor's draft of GCPM [1] proposes a solution to the problem by
> introducing a comma-separated list of values on float. For example:
>  .figure {
>    float: none, top next page;
>  }
> The first value ("none") means that figures are not floated. However,
> I a figure will not fit on the current page, the next value in the
> comma-separated list is used instead. So, if there isn't room for the
> figure on the current page, it will be floated to the top of the next
> page.
> [1] http://dev.w3.org/csswg/css3-gcpm/#page-floats
> When the figure is floated to the next page, it allows the original
> page to continue to be filled, thereby avoiding unused space.

This works when the adjacency of text and images is relatively elastic  
in the opinion of the author. However, in the case I currently have  
under consideration (case #1 in my previous email; cropping) float:  
left; and careful placement of each image next to a given paragraph is  
a relatively inelastic requirement. That is, float: left; is desired  
even if it causes both the image and text move to the next page.  
However, the vertical cropping of the images is more elastic than the  
relationship to text. (The images are of knitting textures, and it's  
relatively OK to crop a photo of a texture.)

> Your suggestiong of allowing cropping and scaling are also
> interesting. However, you will still be left with the problem of what
> to do when cropping/scaling doesn't yield enough -- you don't want to
> scale figures down to unreadable sizes.

In this case, if the image would need to be cropped smaller than some  
threshold to keep it on the same page, the current usual behavior of  
float: left; would be the most acceptable alternative.

> Possibly, croppring/scaling could be combined with the above solution.

Yes, they could be combined, too, in some cases.

Henri Sivonen
Received on Monday, 22 December 2008 14:42:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:42 UTC