Forum How do I...?

column-float "starvation"

chrisryland
We have a two-column Prince layout with semantic tables emitted as floated <figure> wrappers. Some are column floats, some are full-width page floats.

Current CSS is roughly:

.document-body {
column-count: 2;
}

figure.docpress-float {
-prince-float: column;
}

figure.docpress-float[data-float-width="full"] {
-prince-float: page;
}

And the HTML pattern is:

<h1>Title</h1>
<p>Intro...</p>

<figure class="docpress-float docpress-table">Table 1...</figure>
<figure class="docpress-float docpress-table" data-float-width="full">Table 2...</figure>
<figure class="docpress-float docpress-table">Table 3...</figure>
<figure class="docpress-float docpress-table" data-float-width="full">Table 4...</figure>

Observed behavior:

the page floats (Table 2, Table 4) get placed before the earlier column floats (Table 1, Table 3)
in our repro, Table 1 ends up on page 3 and Table 3 on page 4, even though they occur earlier in source,'

-prince-float-policy: in-order does not change this.

Allowing table { break-inside: auto } does not change this either, presumably because the outer floated figure remains the placement unit.

So the question is, in a mixed two-column setup with -prince-float: column and -prince-float: page, is there any way to force earlier column floats to be placed before later page floats when source order requires it?

Related question: Does -prince-float-policy: in-order only order floats within the same effective float queue/reference context, rather than across mixed column and page floats?
markbrown
The float policy applies separately to column and page floats, and there's currently no way to force the ordering between them, sorry.

May I ask if the aim is just to have page floats placed side-by-side or is there something else about column floats that is also important? Side-by-side page floats are something that we've already been considering potential solutions for, so it would be good to know if that might help in your case.
chrisryland
Maybe I'm not understanding your question, but the page floats are generally page-wide and the column floats are column-wide.

It's just surprising that the column floats can be "starved out" by a series of page floats, for many pages in a row.