vivliostyle / vivliostyle.js

📖 The power of CSS typesetting, right at your fingertips.
https://vivliostyle.org
GNU Affero General Public License v3.0
606 stars 53 forks source link

Bug: image floats inside next block #1418

Open MoamenAbdelsattar opened 1 week ago

MoamenAbdelsattar commented 1 week ago

I'm trying to use page floats, so I set float: top for the following image. The result is image inside the following poetic verse, instead of being above it: v-float-bug

Expected result: v-flot-bug2

MoamenAbdelsattar commented 1 week ago

Problem can be easily fixed by adding clear: both; to the following div After pagination. Adding it before pagination doesn't solve the issue.

MoamenAbdelsattar commented 1 week ago

Hi, problem is solved after using epub partitions instead of page floats, however the documentation says "Future version of Vivliostyle may drop support for this spec." I hope that doesn't happen 😶

MurakamiShinyu commented 1 week ago

There was a similar issue:

This issue was fixed by pr #1075.

However, the problem still happens if the page float width is narrower than page area width.

To avoid the problem, specify float on the image's parent block element (e.g., figure element) and align the image in it.

I hope this helps.