Re: [css-page-floats] comments on Page Floats

Håkon Wium Lie <howcome@opera.com> wrote on 2013/09/16 19:31:40
> MURAKAMI-san wrote:
> 
>  > I have read the CSS Page Floats editor's draft[1] (split from CSS3 GCPM)
>  > and comparing with our (AntennaHouse) page floats implementation[2] 
>  > and have some questions.
> 
> Thanks for your long message. You make many good points and I will go
> through in detail. However, I have a clarifying question and a few
> comments to the first part of your message.
> 
>  > [1] http://dev.w3.org/csswg/css-page-floats/
>  > [2] http://antennahouse.com/CSSInfo/float-extension.html
>  > 
>  > 
>  > float-defer-column/page
>  > -----------------------
>  > 
>  >     Example 10
>  > 
>  >     Float figure to the top of the column that follows the natural column: 
>  >     .figure { float: top }
>  >     .figure { float-defer-column: 1 }
>  > 
>  > This seems to correspond to our '-ah-float: top next column'.
>  > However in most cases, 'auto-next' is more preferable than 'next'.
> 
> I don't understand the 'auto-next' value, as defined and implemented
> by AH. The deifinition is:
> 
>   auto-next: The float is moved to the next page (or column) if there
>     is no sufficient space in the current page (or column).
> 
> However, if there isn't enough space in the current page/column, the
> float must be moved to the next page/column anyway. So, I don't
> understand what effect the value has.

The 'auto-next' is the default behavior of AH pages floats,
and I thought that 'float-defer-column: none' would be the same.

http://antennahouse.com/CSSInfo/float-extension.html#axf.float-move
  Initial: auto
  auto: Same as keep if float-y is none, same as auto-next otherwise.

'float-y is none' means this float is not a page float.

> It seems similar to the 'unless-room' value found here:
> 
>   http://www.w3.org/TR/css3-gcpm/#float-modifiers
> 
> However, the effect of 'unless-room' is that it turns on floating; if
> there is enough room, the element will not be floated. But 'auto-next'
> only applies to floats, so it it is not the same as 'unless-room'.

However 'auto-next' can apply to non-page floats.

.figure {
  -ah-float: left auto-next;
}

This float is almost same as normal 'float: left', 
but when there is no sufficient space in the current
page/column and a page/column break occurs at before the 
float, the blank space remains with normal 'float: left'
(the text following the float moves to the next page 
together with the float) and no such blank space remains 
with 'auto-next'.

This effect is similar to the 'float: snap(0)',
although 'auto-next' cannot change non-float to a float
and cannot change non-page float to a page-float.

> Perhaps we could have an alias like: 
> 
>   "snap(0)" == "make-me-a-float-if-I-cause-a-column-break-so-that-I-dont-create-a-big-ugly-block-of-whitespace"
> 
> There's a discussion on the topic here:
> 
>   http://www.princexml.com/forum/topic/2379/float-unless-fit-vs-unless-room

Thanks, interesting.

One question:

<div style="margin-left: 3cm; margin-right: 3cm">
  ...
  <figure style="float: snap(0); width: 100%;">
    ...
  </figure>
</div>

If snap(0) makes itself a page float conditionally,
the width of the figure also will be changed?
(When this figure is a page float, the 100% width is
the column/page width and the margin-left/right
of the div does not affect the width of the page float.)


Regards,

Shinyu Murakami
Antenna House

Received on Monday, 16 September 2013 18:31:58 UTC