Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | <!DOCTYPE html> |
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 | <html> |
michael@0 | 7 | <head> |
michael@0 | 8 | <title>CSS Reftest Reference</title> |
michael@0 | 9 | <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> |
michael@0 | 10 | <meta charset="utf-8"> |
michael@0 | 11 | <style> |
michael@0 | 12 | .flexContainer { |
michael@0 | 13 | display: flex; |
michael@0 | 14 | flex-wrap: wrap; |
michael@0 | 15 | |
michael@0 | 16 | /* These let us show where each flex line begins (and hence, how tall |
michael@0 | 17 | the flex lines end up) */ |
michael@0 | 18 | align-content: flex-start; |
michael@0 | 19 | align-items: flex-start; |
michael@0 | 20 | |
michael@0 | 21 | width: 30px; |
michael@0 | 22 | background: yellow; |
michael@0 | 23 | border: 1px dotted black; |
michael@0 | 24 | float: left; |
michael@0 | 25 | margin: 5px; |
michael@0 | 26 | } |
michael@0 | 27 | .collapsedItem { |
michael@0 | 28 | width: 0; |
michael@0 | 29 | height: 25px; |
michael@0 | 30 | } |
michael@0 | 31 | .halfWidthItem { |
michael@0 | 32 | width: 15px; |
michael@0 | 33 | height: 15px; |
michael@0 | 34 | background: teal; |
michael@0 | 35 | } |
michael@0 | 36 | .fullWidthItem { |
michael@0 | 37 | width: 30px; |
michael@0 | 38 | height: 20px; |
michael@0 | 39 | background: purple; |
michael@0 | 40 | } |
michael@0 | 41 | .veryTallItem { |
michael@0 | 42 | width: 15px; |
michael@0 | 43 | height: 40px; |
michael@0 | 44 | background: olive; |
michael@0 | 45 | } |
michael@0 | 46 | </style> |
michael@0 | 47 | </head> |
michael@0 | 48 | <body> |
michael@0 | 49 | <!-- FIRST ROW: --> |
michael@0 | 50 | <!-- One collapsed flex item, at the beginning of a flex line, which |
michael@0 | 51 | ends up establishing its flex line's cross size: --> |
michael@0 | 52 | <div class="flexContainer"> |
michael@0 | 53 | <div class="collapsedItem"></div> |
michael@0 | 54 | <div class="halfWidthItem"></div> |
michael@0 | 55 | <div class="fullWidthItem"></div> |
michael@0 | 56 | </div> |
michael@0 | 57 | <!-- ...and now with it being at the end of that flex line: --> |
michael@0 | 58 | <div class="flexContainer"> |
michael@0 | 59 | <div class="halfWidthItem"></div> |
michael@0 | 60 | <div class="collapsedItem"></div> |
michael@0 | 61 | <div class="fullWidthItem"></div> |
michael@0 | 62 | </div> |
michael@0 | 63 | |
michael@0 | 64 | <div style="clear: both"></div> |
michael@0 | 65 | |
michael@0 | 66 | <!-- SECOND ROW: --> |
michael@0 | 67 | <!-- One collapsed flex item, initially in its own line. It ends |
michael@0 | 68 | up being merged into another line after it collapses, due to its |
michael@0 | 69 | (post-collapse) zero main-size. --> |
michael@0 | 70 | <div class="flexContainer"> |
michael@0 | 71 | <div class="collapsedItem"></div> |
michael@0 | 72 | <div class="fullWidthItem"></div> |
michael@0 | 73 | <div class="fullWidthItem"></div> |
michael@0 | 74 | </div> |
michael@0 | 75 | <div class="flexContainer"> |
michael@0 | 76 | <div class="fullWidthItem"></div> |
michael@0 | 77 | <div class="collapsedItem"></div> |
michael@0 | 78 | <div class="fullWidthItem"></div> |
michael@0 | 79 | </div> |
michael@0 | 80 | <div class="flexContainer"> |
michael@0 | 81 | <div class="fullWidthItem"></div> |
michael@0 | 82 | <div class="fullWidthItem"></div> |
michael@0 | 83 | <div class="collapsedItem"></div> |
michael@0 | 84 | </div> |
michael@0 | 85 | |
michael@0 | 86 | <div style="clear: both"></div> |
michael@0 | 87 | |
michael@0 | 88 | <!-- THIRD ROW: --> |
michael@0 | 89 | <!-- One collapsed flex item, initially in a line with an even-taller item. |
michael@0 | 90 | The collapsed item ends up shifting into another line after it |
michael@0 | 91 | collapses, but it carries the taller item's cross size with it, as its |
michael@0 | 92 | strut size. --> |
michael@0 | 93 | <div class="flexContainer"> |
michael@0 | 94 | <div class="fullWidthItem"></div> |
michael@0 | 95 | <div class="collapsedItem" style="height: 40px"></div> |
michael@0 | 96 | <div class="veryTallItem"></div> |
michael@0 | 97 | </div> |
michael@0 | 98 | <!-- ...and now with two (differently-sized) struts in first line: |
michael@0 | 99 | (the one that's taller - due to being initially grouped with the tall |
michael@0 | 100 | item - wins out.) --> |
michael@0 | 101 | <div class="flexContainer"> |
michael@0 | 102 | <div class="collapsedItem"></div> |
michael@0 | 103 | <div class="fullWidthItem"></div> |
michael@0 | 104 | <div class="collapsedItem" style="height: 40px"></div> |
michael@0 | 105 | <div class="veryTallItem"></div> |
michael@0 | 106 | </div> |
michael@0 | 107 | </body> |
michael@0 | 108 | </html> |