| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Any copyright is dedicated to the Public Domain. | 3 Any copyright is dedicated to the Public Domain. |
| 4 http://creativecommons.org/publicdomain/zero/1.0/ | 4 http://creativecommons.org/publicdomain/zero/1.0/ |
| 5 --> | 5 --> |
| 6 <!-- This testcase checks flex items are painted atomically. In particular, | 6 <!-- This testcase checks flex items are painted atomically. In particular, |
| 7 if one item has content that overflows into the region of another item, | 7 if one item has content that overflows into the region of another item, |
| 8 then one item is painted "behind" the other; there shouldn't normally | 8 then one item is painted "behind" the other; there shouldn't normally |
| 9 any interleaving of backgrounds and content between the two items. | 9 any interleaving of backgrounds and content between the two items. |
| 10 | 10 |
| 11 This testcase also tests some special cases that will change the paint | 11 This testcase also tests some special cases that will change the paint |
| 12 ordering - specifically, the properties "position", "z-index", and | 12 ordering - specifically, the properties "position", "z-index", and |
| 13 "order" on flex items. | 13 "order" on flex items. |
| 14 --> | 14 --> |
| 15 <html> | 15 <html> |
| 16 <head> | 16 <head> |
| 17 <style> | 17 <style> |
| 18 body { font: 10px sans-serif } | 18 body { font: 10px sans-serif } |
| 19 .flexContainer { | 19 .flexContainer { |
| 20 background: orange; | 20 background: orange; |
| 21 display: flex; | 21 display: flex; |
| 22 justify-content: space-between; | 22 justify-content: space-between; |
| 23 width: 70px; | 23 width: 70px; |
| 24 padding: 2px; | 24 padding: 2px; |
| 25 margin-bottom: 2px; | 25 margin-bottom: 2px; |
| 26 } | 26 } |
| 27 .item1 { | 27 .item1 { |
| 28 background: lightblue; | 28 background: lightblue; |
| 29 width: 30px; | 29 width: 30px; |
| 30 min-width: 0; |
| 30 } | 31 } |
| 31 .item2 { | 32 .item2 { |
| 32 background: yellow; | 33 background: yellow; |
| 33 width: 30px; | 34 width: 30px; |
| 35 min-width: 0; |
| 34 } | 36 } |
| 35 </style> | 37 </style> |
| 36 </head> | 38 </head> |
| 37 <body> | 39 <body> |
| 38 <!-- This container has two flex items, the first of which has content | 40 <!-- This container has two flex items, the first of which has content |
| 39 sticking out & overlapping the second. If they're painting atomically | 41 sticking out & overlapping the second. If they're painting atomically |
| 40 (and in the right order), the second item's background should cover the | 42 (and in the right order), the second item's background should cover the |
| 41 first item's overflowing content. --> | 43 first item's overflowing content. --> |
| 42 <div class="flexContainer" | 44 <div class="flexContainer" |
| 43 ><div class="item1">ThisIsALongUnbrokenString</div | 45 ><div class="item1">ThisIsALongUnbrokenString</div |
| (...skipping 29 matching lines...) Expand all Loading... |
| 73 ></div> | 75 ></div> |
| 74 | 76 |
| 75 <!-- ...but if we relatively position that second item, it should paint | 77 <!-- ...but if we relatively position that second item, it should paint |
| 76 on top again, despite its low "order" value. --> | 78 on top again, despite its low "order" value. --> |
| 77 <div class="flexContainer" | 79 <div class="flexContainer" |
| 78 ><div class="item1">ThisIsALongUnbrokenString</div | 80 ><div class="item1">ThisIsALongUnbrokenString</div |
| 79 ><div class="item2" style="order: -1; position: relative">HereIsSomeMoreLong
Text</div | 81 ><div class="item2" style="order: -1; position: relative">HereIsSomeMoreLong
Text</div |
| 80 ></div> | 82 ></div> |
| 81 </body> | 83 </body> |
| 82 </html> | 84 </html> |
| OLD | NEW |