OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 .halfsquare { width:15px; height:30px; background:blue; } |
| 4 </style> |
| 5 <p>There should be a blue square below.</p> |
| 6 <div style="position:relative; columns:2; column-gap:0; column-fill:auto; width:
400px; height:90px; line-height:20px;"> |
| 7 <div style="margin-left:auto; margin-bottom:30px;" class="halfsquare"></div> |
| 8 <div id="float1" style="float:left; width:60px; height:30px;"></div> |
| 9 <div id="float2" style="float:left; width:130px; height:15px;"></div> |
| 10 <div id="float3" style="float:left;" class="halfsquare"><br></div> |
| 11 </div> |
| 12 <script src="../resources/testharness.js"></script> |
| 13 <script src="../resources/testharnessreport.js"></script> |
| 14 <script> |
| 15 test(() => { |
| 16 // #float1 and #float2 fit beside each other, since their total |
| 17 // width is 190px, and column width is greater, i.e. 200px. |
| 18 // |
| 19 // #float3 is 15px wide. It cannot fit beside both #float1 and |
| 20 // #float2, because that would exceed the column width. It could |
| 21 // fit beside #float2 alone, though. However, at this point we |
| 22 // only have 15px of available height remaining in the first |
| 23 // column, and #float3 requires 20px (the blank line inside, |
| 24 // which is unbreakable), so it needs to be pushed to the next |
| 25 // column, and thus end up after both preceding floats. |
| 26 var float3 = document.getElementById("float3"); |
| 27 assert_equals(float3.offsetTop, 0); |
| 28 assert_equals(float3.offsetLeft, 200); |
| 29 }, "Float pushed down by sibling float, and then by pagination, affecting final
inline position."); |
| 30 </script> |
OLD | NEW |