1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-collapsed-item-horiz-1-ref.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,102 @@ 1.4 +<!DOCTYPE html> 1.5 +<!-- 1.6 + Any copyright is dedicated to the Public Domain. 1.7 + http://creativecommons.org/publicdomain/zero/1.0/ 1.8 +--> 1.9 +<!-- In this reference case, we have blocks in place of the testcase's 1.10 + flex containers. The testcase's collapsed flex items are entirely 1.11 + absent here (and the remaining content is sized using exact pixel 1.12 + values). 1.13 +--> 1.14 +<html> 1.15 +<head> 1.16 + <title>CSS Reftest Reference</title> 1.17 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 1.18 + <meta charset="utf-8"> 1.19 + <style> 1.20 + .flexContainer { 1.21 + display: flex; 1.22 + background: yellow; 1.23 + border: 1px dotted black; 1.24 + float: left; 1.25 + margin: 5px; 1.26 + } 1.27 + .flexContainer > * { 1.28 + /* All flex items have 20px base size */ 1.29 + width: 20px; 1.30 + } 1.31 + .collapse { 1.32 + flex-basis: 0; 1.33 + height: 20px; 1.34 + } 1.35 + .flexible { 1.36 + flex: 1 auto; 1.37 + } 1.38 + .heightTall { 1.39 + height: 40px; 1.40 + background: purple; 1.41 + } 1.42 + .heightAuto { 1.43 + background: teal; 1.44 + } 1.45 + .heightShort { 1.46 + height: 10px; 1.47 + background: pink; 1.48 + } 1.49 + </style> 1.50 +</head> 1.51 +<body> 1.52 + <!-- FIRST ROW: --> 1.53 + <!-- Just one (collapsed) flex item, which ends up establishing 1.54 + the container's size (even though it's collapsed): --> 1.55 + <div class="flexContainer"> 1.56 + <div class="heightTall collapse"></div> 1.57 + </div> 1.58 + 1.59 + <div style="clear: both"></div> 1.60 + 1.61 + <!-- SECOND ROW: --> 1.62 + <!-- One collapsed flex item, one short flex item. 1.63 + (Container ends up with collapsed item's height) --> 1.64 + <div class="flexContainer"> 1.65 + <div class="heightTall collapse"></div> 1.66 + <div class="heightShort"></div> 1.67 + </div> 1.68 + <!-- (same, but with items in opposite order) --> 1.69 + <div class="flexContainer"> 1.70 + <div class="heightShort"></div> 1.71 + <div class="heightTall collapse"></div> 1.72 + </div> 1.73 + 1.74 + <div style="clear: both"></div> 1.75 + 1.76 + <!-- THIRD ROW: --> 1.77 + <!-- One collapsed flex item, one stretched flex item. 1.78 + (Container and stretched item end up with collapsed item's height) --> 1.79 + <div class="flexContainer"> 1.80 + <div class="heightTall collapse"></div> 1.81 + <div class="heightAuto"></div> 1.82 + </div> 1.83 + <!-- (again, with items in opposite order) --> 1.84 + <div class="flexContainer"> 1.85 + <div class="heightAuto"></div> 1.86 + <div class="heightTall collapse"></div> 1.87 + </div> 1.88 + 1.89 + <div style="clear: both"></div> 1.90 + 1.91 + <!-- FOURTH ROW: --> 1.92 + <!-- One collapsed flex item, one other flex item; both are flexible. 1.93 + (The non-collapsed one should take all of the available width.) --> 1.94 + <div class="flexContainer"> 1.95 + <div class="heightAuto collapse"></div> 1.96 + <div class="heightTall flexible"></div> 1.97 + </div> 1.98 + <!-- (again, with items in opposite order) --> 1.99 + <div class="flexContainer"> 1.100 + <div class="heightTall flexible"></div> 1.101 + <div class="heightAuto collapse"></div> 1.102 + </div> 1.103 + 1.104 +</body> 1.105 +</html>