Thu, 15 Jan 2015 21:13:52 +0100
Remove forgotten relic of ABI crash risk averse overloaded method change.
michael@0 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
michael@0 | 2 | <!-- |
michael@0 | 3 | Any copyright is dedicated to the Public Domain. |
michael@0 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 5 | --> |
michael@0 | 6 | <!-- |
michael@0 | 7 | Testcase with table parts inside of a flex container, triggering |
michael@0 | 8 | table-fixup. We use justify-content:space-between to stick packing |
michael@0 | 9 | space between flex items, so that we can verify that e.g. a contiguous |
michael@0 | 10 | run of <td>s will end up in the same flex item (wrapped in a table). |
michael@0 | 11 | |
michael@0 | 12 | In this variant of the test, we also assign 'flex' values to the |
michael@0 | 13 | table parts - these values should have no effect, since these children |
michael@0 | 14 | don't themselves form flex items. The flex property _is_ honored on |
michael@0 | 15 | the <div class="c">, though, because _its_ box _is_ a direct child of a |
michael@0 | 16 | flexbox, so it _is_ a flex item. |
michael@0 | 17 | --> |
michael@0 | 18 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 19 | <head> |
michael@0 | 20 | <title>CSS Test: Testing that the 'flex' shorthand has no effect on table cells in a flex container, since they aren't flex items</title> |
michael@0 | 21 | <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> |
michael@0 | 22 | <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-items"/> |
michael@0 | 23 | <link rel="match" href="flexbox-table-fixup-1-ref.xhtml"/> |
michael@0 | 24 | <style> |
michael@0 | 25 | div.flexbox { |
michael@0 | 26 | border: 1px dashed blue; |
michael@0 | 27 | width: 200px; |
michael@0 | 28 | display: flex; |
michael@0 | 29 | justify-content: space-around; |
michael@0 | 30 | } |
michael@0 | 31 | |
michael@0 | 32 | <!-- NOTE: table-fixup pads each td element by 1px on each side. We |
michael@0 | 33 | override that for top & bottom, for simplicity. So the td makes us |
michael@0 | 34 | generate a box that's 2px wider than its contents. --> |
michael@0 | 35 | td { |
michael@0 | 36 | padding-top: 0px; |
michael@0 | 37 | padding-bottom: 0px; |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | .a { |
michael@0 | 41 | background: lightgreen; |
michael@0 | 42 | width: 48px; |
michael@0 | 43 | flex: 5 3 100px; |
michael@0 | 44 | } |
michael@0 | 45 | |
michael@0 | 46 | .b { |
michael@0 | 47 | background: yellow; |
michael@0 | 48 | width: 48px; |
michael@0 | 49 | flex: 1 2 3px; |
michael@0 | 50 | } |
michael@0 | 51 | |
michael@0 | 52 | .c { |
michael@0 | 53 | background: pink; |
michael@0 | 54 | flex: 0 0 48px; |
michael@0 | 55 | } |
michael@0 | 56 | </style> |
michael@0 | 57 | </head> |
michael@0 | 58 | <body> |
michael@0 | 59 | <!-- Just 2 adjacent table cells (they end up in the same table) --> |
michael@0 | 60 | <div class="flexbox" |
michael@0 | 61 | ><td class="a">cell1</td><td class="b">cell2</td></div> |
michael@0 | 62 | |
michael@0 | 63 | <!-- Table cell followed by tbody (they end up in the same table) --> |
michael@0 | 64 | <div class="flexbox" |
michael@0 | 65 | ><td class="a">cell1</td><tbody class="b">t</tbody></div> |
michael@0 | 66 | |
michael@0 | 67 | <!-- Empty table cell (ends up occupying 2px of width), followed by div, |
michael@0 | 68 | followed by nonempty table cell. (3 flex items). --> |
michael@0 | 69 | <!-- Note: We use "space-between" (instead of "space-around") here because |
michael@0 | 70 | it makes the math cleaner. (100px split 2 ways instead of 3 ways.) --> |
michael@0 | 71 | <div class="flexbox" style="justify-content: space-between" |
michael@0 | 72 | ><td></td><div class="c">div</div><td class="b">cell1</td></div> |
michael@0 | 73 | </body> |
michael@0 | 74 | </html> |