OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <div style="position:relative; width:500px;"> |
| 3 <!-- With such large horizontal borders and padding, the content box width |
| 4 of the following block should become 0, since its available width is |
| 5 just 500px. The percentage padding specified on its child should |
| 6 resolve to 0 for all sides, since percentage padding is always |
| 7 resolved against the logical *width* of the containing block (even for |
| 8 padding-top and padding-bottom). --> |
| 9 <div style="position:relative; padding:0 1234567890px; border-width:0 123456
7890px; border-style:solid;"> |
| 10 <div id="inner" style="padding:10%; height:300px;"></div> |
| 11 </div> |
| 12 <!-- And here's a sibling to verify that the insane border and padding and |
| 13 percentage padding resolution didn't have any ill effects on block |
| 14 progression. --> |
| 15 <div id="sibling"></div> |
| 16 </div> |
| 17 <script src="../../resources/testharness.js"></script> |
| 18 <script src="../../resources/testharnessreport.js"></script> |
| 19 <script> |
| 20 test(() => { |
| 21 assert_equals(document.getElementById("sibling").offsetTop, 300); |
| 22 assert_equals(document.getElementById("inner").offsetWidth, 0); |
| 23 assert_equals(document.getElementById("inner").offsetHeight, 300); |
| 24 }, "Sizes should never become negative"); |
| 25 </script> |
OLD | NEW |