flexbox-table-fixup-001.xhtml (2099B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <!-- 7 Testcase with table parts inside of a flex container, which should *not* 8 trigger table-fixup. We use justify-content:space-between to stick packing 9 space between flex items, so that we can verify that e.g. a contiguous 10 run of <td>s will each be blockified & form its own flex item (instead of 11 being aggregated into a single table & single flex item). 12 --> 13 <html xmlns="http://www.w3.org/1999/xhtml"> 14 <head> 15 <title>CSS Test: Testing that table cells in a flex container get blockified and each form their own flex item</title> 16 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 17 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-items"/> 18 <link rel="match" href="flexbox-table-fixup-001-ref.xhtml"/> 19 <style> 20 div.flexbox { 21 border: 1px dashed blue; 22 width: 200px; 23 display: flex; 24 justify-content: space-around; 25 } 26 27 td { 28 /* Remove any default padding for td elements, so we can compare them 29 easily against blocks in the reference case. */ 30 padding: 0px; 31 } 32 33 .a { 34 background: lightgreen; 35 width: 48px; 36 } 37 38 .b { 39 background: yellow; 40 width: 48px; 41 } 42 43 .c { 44 background: pink; 45 width: 48px; 46 } 47 </style> 48 </head> 49 <body> 50 <!-- The adjacent table-parts in each example below should *not* be 51 grouped into the same flex item. --> 52 <!-- 2 adjacent table cells --> 53 <div class="flexbox" 54 ><td class="a">cell1</td><td class="b">cell2</td></div> 55 56 <!-- Table cell followed by tbody --> 57 <div class="flexbox" 58 ><td class="a">cell1</td><tbody class="b">t</tbody></div> 59 60 <!-- Empty table cell (ends up occupying 2px of width), followed by 61 nonempty table cell.--> 62 <div class="flexbox" 63 ><td></td><td class="b">cell1</td></div> 64 </body> 65 </html>