You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<style>
body {
margin: 0;
}
p {
margin: 20px 0;
}
figure {
float: left;
margin: 10px;
background: cyan;
}
</style><body><figure>FLOAT</figure><p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Libero tempore quam fugit quibusdam amet facilis perspiciatis itaque ipsa pariatur a minima, assumenda quis nobis quisquam ex alias soluta id ipsum. Eligendi, excepturi error veritatis voluptates minima sed? Recusandae ipsam repellat quaerat.</p><figure>FLOAT</figure><p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Facere quos in cumque odit possimus eum velit voluptate libero repellendus alias molestiae error, eius rerum ratione commodi a vel cum dolores!</p><figure>FLOAT</figure><p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Sit, in obcaecati. Molestias ipsa ex maiores odio doloribus nisi dolore distinctio libero suscipit quos, inventore, repudiandae mollitia, neque delectus placeat! Fugiat.</p>
…
In this test case, the problems on page 1 and page 2 are different. There are following two problems:
Problem 1: The block-start position of the first float's margin edge should be affected by the block-start margin of the first paragraph even though the float element is followed by the paragraph element, because the block-start margin of the paragraph is collapsed with the block-start margin of the body element.
Problem 2: The block-start margin of floats should not be discarded at unforced page breaks. The CSS spec is not clear about this, but auto-discarding the block-start margin of floats at unforced page breaks causes inconsistent look at page breaks, so we should avoid it.
Problem 2: The block-start margin of floats should not be discarded at unforced page breaks. The CSS spec is not clear about this, but auto-discarding the block-start margin of floats at unforced page breaks causes inconsistent look at page breaks, so we should avoid it.
Test sample: float-margin-test.html
Test with Vivliostyle Viewer (v2.27.0):
https://vivliostyle.github.io/viewer/v2.27.0/#src=https://gist.githack.com/MurakamiShinyu/ec57c870f6a62348a0b3f279dc4b284b/raw/float-margin-test.html
Result screenshot:
Expected result:
The text was updated successfully, but these errors were encountered: