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
Absolutely positioned element stays on the previous page #591
Comments
Exactly. Having the blue box on a separate page (as Prince does) is an implementation detail that is not in the CSS specification AFAIK. The "real" problem in WeasyPrint is the missing blue and green borders on the first page. You can find another example on the W3C testing suite, where the purple border should be visible from the top to the bottom of the pages. This problem is not directly related to the |
Do you mean that in my example everything would be fine if only the border on the first page extended to the bottom? I don't think so, in my opinion the red frame should be next to the green one and not on separate pages. In other words, the green frame should take 100% of the parent's height, as in Prince and Pale Moon. |
I don't know if would be fine, but AFAIK it would be right according to the spec.
In my opinion we should read CSS Fragmentation to not rely on our opinions anymore 😉. |
I admit that I don't have resources to read and understand the standard. But I want to be able to make boxes next to each other and I can't see how it's a good idea to make one of them jump to the next page while the first one stays. If it can't be fixed, I have to move from WeasyPrint and find something that can do this. |
This problem is fixed.
The spec says that we can break:
As there's no gap between the blue and the green boxes, we can't break here. |
Here’s what we get with the latest stable version of WeasyPrint: absolute.pdf This bug has probably been fixed in 54.x with #36 🎉. |
Consider this example:
This is what it looks like converted with WeasyPrint 0.42.2:
For reference, this is what comes out of Prince (free version):
As you can see, in WeasyPrint the absolute element as well as the top border stay on the previous page when they should be on the next page with the rest of
div.main
. Note: the top border is positioned properly when the absolute element is removed.The text was updated successfully, but these errors were encountered: