Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
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 Test: Testing that visibility:collapse on a flex item in a multi-line flex container creates struts, and that they can migrate between lines</title> |
michael@0 | 9 | <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> |
michael@0 | 10 | <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#algo-visibility"> |
michael@0 | 11 | <link rel="match" href="flexbox-collapsed-item-horiz-2-ref.html"> |
michael@0 | 12 | <meta charset="utf-8"> |
michael@0 | 13 | <style> |
michael@0 | 14 | .flexContainer { |
michael@0 | 15 | display: flex; |
michael@0 | 16 | flex-wrap: wrap; |
michael@0 | 17 | |
michael@0 | 18 | /* These let us show where each flex line begins (and hence, how tall |
michael@0 | 19 | the flex lines end up) */ |
michael@0 | 20 | align-content: flex-start; |
michael@0 | 21 | align-items: flex-start; |
michael@0 | 22 | |
michael@0 | 23 | width: 30px; |
michael@0 | 24 | background: yellow; |
michael@0 | 25 | border: 1px dotted black; |
michael@0 | 26 | float: left; |
michael@0 | 27 | margin: 5px; |
michael@0 | 28 | } |
michael@0 | 29 | .collapsedItem { |
michael@0 | 30 | visibility: collapse; |
michael@0 | 31 | width: 15px; |
michael@0 | 32 | height: 25px; |
michael@0 | 33 | } |
michael@0 | 34 | .halfWidthItem { |
michael@0 | 35 | width: 15px; |
michael@0 | 36 | height: 15px; |
michael@0 | 37 | background: teal; |
michael@0 | 38 | } |
michael@0 | 39 | .fullWidthItem { |
michael@0 | 40 | width: 30px; |
michael@0 | 41 | height: 20px; |
michael@0 | 42 | background: purple; |
michael@0 | 43 | } |
michael@0 | 44 | .veryTallItem { |
michael@0 | 45 | width: 15px; |
michael@0 | 46 | height: 40px; |
michael@0 | 47 | background: olive; |
michael@0 | 48 | } |
michael@0 | 49 | </style> |
michael@0 | 50 | </head> |
michael@0 | 51 | <body> |
michael@0 | 52 | <!-- FIRST ROW: --> |
michael@0 | 53 | <!-- One collapsed flex item, at the beginning of a flex line, which |
michael@0 | 54 | ends up establishing its flex line's cross size: --> |
michael@0 | 55 | <div class="flexContainer"> |
michael@0 | 56 | <div class="collapsedItem"></div> |
michael@0 | 57 | <div class="halfWidthItem"></div> |
michael@0 | 58 | <div class="fullWidthItem"></div> |
michael@0 | 59 | </div> |
michael@0 | 60 | <!-- ...and now with it being at the end of that flex line: --> |
michael@0 | 61 | <div class="flexContainer"> |
michael@0 | 62 | <div class="halfWidthItem"></div> |
michael@0 | 63 | <div class="collapsedItem"></div> |
michael@0 | 64 | <div class="fullWidthItem"></div> |
michael@0 | 65 | </div> |
michael@0 | 66 | |
michael@0 | 67 | <div style="clear: both"></div> |
michael@0 | 68 | |
michael@0 | 69 | <!-- SECOND ROW: --> |
michael@0 | 70 | <!-- One collapsed flex item, initially in its own line. It ends |
michael@0 | 71 | up being merged into another line after it collapses, due to its |
michael@0 | 72 | (post-collapse) zero main-size. --> |
michael@0 | 73 | <div class="flexContainer"> |
michael@0 | 74 | <div class="collapsedItem"></div> |
michael@0 | 75 | <div class="fullWidthItem"></div> |
michael@0 | 76 | <div class="fullWidthItem"></div> |
michael@0 | 77 | </div> |
michael@0 | 78 | <div class="flexContainer"> |
michael@0 | 79 | <div class="fullWidthItem"></div> |
michael@0 | 80 | <div class="collapsedItem"></div> |
michael@0 | 81 | <div class="fullWidthItem"></div> |
michael@0 | 82 | </div> |
michael@0 | 83 | <div class="flexContainer"> |
michael@0 | 84 | <div class="fullWidthItem"></div> |
michael@0 | 85 | <div class="fullWidthItem"></div> |
michael@0 | 86 | <div class="collapsedItem"></div> |
michael@0 | 87 | </div> |
michael@0 | 88 | |
michael@0 | 89 | <div style="clear: both"></div> |
michael@0 | 90 | |
michael@0 | 91 | <!-- THIRD ROW: --> |
michael@0 | 92 | <!-- One collapsed flex item, initially in a line with an even-taller item. |
michael@0 | 93 | The collapsed item ends up shifting into another line after it |
michael@0 | 94 | collapses, but it carries the taller item's cross size with it, as its |
michael@0 | 95 | strut size. --> |
michael@0 | 96 | <div class="flexContainer"> |
michael@0 | 97 | <div class="fullWidthItem"></div> |
michael@0 | 98 | <div class="collapsedItem"></div> |
michael@0 | 99 | <div class="veryTallItem"></div> |
michael@0 | 100 | </div> |
michael@0 | 101 | <!-- ...and now with two (differently-sized) struts in first line: |
michael@0 | 102 | (the one that's taller - due to being initially grouped with the tall |
michael@0 | 103 | item - wins out.) --> |
michael@0 | 104 | <div class="flexContainer"> |
michael@0 | 105 | <div class="collapsedItem"></div> |
michael@0 | 106 | <div class="fullWidthItem"></div> |
michael@0 | 107 | <div class="collapsedItem"></div> |
michael@0 | 108 | <div class="veryTallItem"></div> |
michael@0 | 109 | </div> |
michael@0 | 110 | </body> |
michael@0 | 111 | </html> |