[css-page-floats] comments on Page Floats

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.

[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'.
Probably the behavior of 'float-defer-column: none' will be like that.
I found two definitions of 'none' in the editor's draft:

    none
        the page float appears in the natural column/page 
    ...
    none
        The page floats should appear in their natural column/page, if possible. 

I think the first definition is an error and the second is correct.
"if possible" means that it may appear in the next (or a following)
column/page if not possible without making wasteful blank space and 
column/page breaks, right?

We have another '-ah-float-move' value, 'auto-move'. This behavior 
is based on the JLReq
"Basic Ideas about Illustration Positioning in JIS X 4051"
http://www.w3.org/TR/jlreq/#basic_ideas_about_illustration_positioning_in_JISX4051

Indeed, I designed the AH page floats implementation based on the JLReq 
4.3 Positioning of Illustrations
http://www.w3.org/TR/jlreq/#positioning_of_illustrations
with syntax from the GCPM 2010 draft.

BTW, I think the JLReq document can help not only for Japanese layout.
JLReq's "Requirements for Illustration Positioning in Horizontal Layout"
seems same as Western (or other horizontal) layout.


    Example 11

    Float figure to the top of the next-to-last column: 
    .figure { float: top; float-defer-column: -1 }

Similar to the following style with AH float:

    .figure {
      -ah-float: top right multicol;
      -ah-float-offset-x: 2gr; /* 1column + 1gap */
      width: 1gr;
    }

However, the definition of float-defer-* is
"A negative integer value indicates that the page float should be 
displayed in a following column/page, counted from the last column/page."

It seems "in a following column" means that the float cannot positioned
in the natural column or a preceding column.
The above AH float sample has no such constraint.

I think this constraint may be necessary in some cases, but not always.
There are cases that the figures which are specified on middle of a
multicol page but displayed on beginning of the page.
(Positioning floats in a preceding column that already formatted needs
reformatting from that column.)

    Example 12

    Float figure to top of the last column of the multicol element on the current page: 
    
    .figure { float: top; float-defer-column: last }

With AH float,

    .figure {
      -ah-float: top right multicol;
      width: 1gr;
    }


    Example 13

    In combination with ‘column-span’, the figure is floated to the top corner of the multicol element on that page: 
    .figure { float: top; column-span: 2; float-defer-column: last; width: 100% }

With AH float,

    .figure {
      -ah-float: top right multicol;
      width: 3gr;
    }


    Example 14

    Float figure to the top of the second column, spanning two columns: 
    .figure { 
      float: top; column-span: 2;
      float-defer-column: 1;
    }

With AH float,

    .figure {
      -ah-float: top left multicol;
      -ah-float-offset-x: 2gr;
      width: 3gr;
    }

However, the 'float-defer-column: 1' positions the float on the second 
column only when the natural column is the first column.

    Example 15

    Float figure to the top right, leaving one full column: 
    .figure { 
      float: top; column-span: 2;
      float-defer-column: -1;
    }

    Given that there are four columnn, the same layout would be achived with this code: 
    .figure { 
      float: top; column-span: 2;
      float-defer-column: 1;
    }

This ("the same layout ...") works only when the natural column 
is the first column.

With AH float,

    .figure {
      -ah-float: top right multicol;
      -ah-float-offset-x: 2gr;
      width: 3gr;
    }

or
    .figure {
      -ah-float: top left multicol;
      -ah-float-offset-x: 2gr;
      width: 3gr;
    }


    Example 16

    Float figure to the top of the first column on the next-to-last page: 
    .figure { float: top }
    .figure { float-defer-page: -1 }

    Example 17

    Float figure to the top of the next-to-last column on the next-to-last page: 
    .figure { float: top }
    .figure { float-defer-column: -1 }
    .figure { float-defer-page: -1 }

AH has no functionality corresponding 'float-defer-page: -1'.
I don't understand well this functionality.
It seems this will be used for specifying exact page position counted 
from the last page. The definition says "When counting pages, the 
starting point is the last page of the multicol element." 
It means this works only for multi-column? To use this with single-column 
layout, 'column-count: 1' will be necessary to generate multicol element?

What will happen if the figure is specified at the very last of
the multicol element (the natural column/page is the last column/page)?

To position the figure to the next-to-last column on the next-to-last page,
additional two almost blank pages will be generated? Or the text preceding
the figure will move to after the figure to ensure the figure's position 
from the end of the multicol block without generating almost blank pages?


    Example 18

    Float figure to the top of the last column on the natural page: 
    .figure { float: top }
    .figure { float-defer-column: last }

With AH float,

    .figure {
      -ah-float: top right multicol;
      width: 1gr;
    }


    Example 19

    Float figure to the last column on the last page: 
    .figure { float: top }
    .figure { float-defer-column: last }
    .figure { float-defer-page: last }

What will happen if many figures exist in the multicol element
and they don't fit on the last column on the last page?


float: snap()
-------------

"Makes the element float to the top or bottom if it naturally appears within a certain distance from the top or bottom."

AH has similar functionality,
   -ah-float-min-wrap-y: 2em;
is almost same as float: snap(2em, near).

This functionality corresponds to the following rules in the JLReq:

http://www.w3.org/TR/jlreq/#requirements_for_illustration_positioning_in_vertical_mayout
    4.3.3 Requirements for Illustration Positioning in Vertical Layout
    
    e. ... it is bad style and should be avoided to have only one line 
       of main text (in Fig. 4.85, ...

http://www.w3.org/TR/jlreq/#requirements_for_illustration_positioning_in_horizontal_layout
    4.3.4 Requirements for Illustration Positioning in Horizontal Layout
    
    c. ... it is bad style and must be avoided to have just one line of 
       the main text around an illustration in the block direction.
       In the example in Fig. 4.90, ...


float: top/bottom
-----------------

The draft spec says 
"These new keywords (top/bottom/snap) only apply in paged media; 
in continous media declarations with these keywords are ignored."

I have question about this. I think the float:top/bottom/snap also
makes sense for multi-column in not only paged media.

And the spec says 
"Elements with any of these new keywords are called ‘page floats’.

I think this definition has problem when the writing mode is vertical.
In vertical writing mode, float:top/bottom will be same functionality
as float:left/right in horizontal writing mode.

Note that float:left/right in vertical writing mode cannot
be used for page floats because these left/right are line-relative
directions:
http://dev.w3.org/csswg/css-writing-modes/#line-mappings

Perhaps, new property name for page floats will be better?
(AH has '-ah-float-y' for block-direction floats, but we
can change the name and the syntax when better spec is standardized).


float: inside/outside
---------------------

The draft spec says
"These new values (inside/outside) do not create page floats, 
the are simply aliases for ‘left’ and ‘right’."

However, in vertical writing mode, inside/outside must create
page floats. (AH does this)
It is very common in Japanese vertical layout, figures are
positioned on top outside corner. See JLReq
http://www.w3.org/TR/jlreq/#specification_of_the_position_of_illustrations
Fig. 4.79: Common example of illustration positioning


Regards,

Shinyu Murakami
Antenna House

Received on Monday, 16 September 2013 03:45:45 UTC