-
Notifications
You must be signed in to change notification settings - Fork 715
[css-page-float] order of page floats with different float references #1239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@frivoal Does this come from a user? In that case, what did the user expect to happen? The reason the spec was written that way was mainly to make it very clear which float goes where and how the placement process takes place and because the amount of usecases for the other seemed limited. Usually one wants a page top float to float to the top of the page, and a column float to stay within its column, also when that column is smaller due to a page float moving on top of it. |
Yes. One of our users asked us to order the floats "correctly" in such a case. From a user's point of view, expected behavior may be either of the following:
|
Here is what prince outputs. It seems to be close to what the spec currently says. It prioritizes page floats over ccolumn floats. I think as a minimum the current mode needs to continue to be supported. I wonder if the mode you are proposing should be something that one should be able to turn on for the element that contains all floats (the document/body for page floats) or whether it should be per float. If it is per float, I would expect that the algorythm needs to be more complex. If it is per container element, then we may just need to add two different algorythms for the two ways of placing floats. @kwkbtr In the case of the client who asked for this. what did that cleint expect in terms of filling the empty space with extra content (text) or not?
Agreed, this would be apart from the question of order of column and page floats, right?
Are you saying that you want to add a way of specifying for a column float that "If any page floats have been placed on the same page already, then defer this column float to the next page. And if any further page floats will eb placed on this page, then please defer them to the next page?" Could this be covered by creating a second placement logic?
|
@kwkbtr Maybe we could add something like float-policy [1] to allow for the behavior you mention? I would absolutely be in favor of that. I just wonder if we maybe shoudl create two different levels of the spec for that. The current level ws made with the understanding that this could possibly some day be something browsers impelment. With increasing complexity and various optiosn, the likelihood of that is decreasing, so it may be an idea to create two levels of the spec and then have Vivliostyle and others implement the higher level and let the lower level be something for browsers. [1] https://figures.spec.whatwg.org/#page-float-preferences:-float-policy |
As for the usecase of treating column and page floats differently: They may be used differently semantically and therefore have little to do with one-another. For example,
|
In what order should page floats with different float references be placed?
For example, when there are a block-end page float with “page” float reference (A) followed by a block-end page float with “column” float reference (B):
According to the current spec, all page floats with “page” float reference should be placed before layout of “column” page floats begins. In that case, the “page” float A is placed below the “column” float B.
In the above case, the order of the floats (B -> A) is “reversed”. Some people may prefer them placed in the “right” order (A -> B). However, if we place the floats in this order, space next to the “column” float B gets isolated from the rest of the space by the page-wide float A. Should the main text flow into the isolated space, or should it be kept empty?
The text was updated successfully, but these errors were encountered: