1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-multi-line-vert-2.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,85 @@ 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 +<!-- Testcase for how we compute the baseline of a vertical flex container 1.10 + with several flex lines (wrapping in the reverse direction). 1.11 + The spec says this about this case: 1.12 + [Given that the first line has no baseline-aligned items:] 1.13 + ...if the flex container has at least one flex item, and its 1.14 + first flex item has a baseline parallel to the flex 1.15 + container's main axis, the flex container's main-axis 1.16 + baseline is that baseline. 1.17 +--> 1.18 +<html> 1.19 +<head> 1.20 + <title>CSS Test: Testing the baseline of a vertical flex container with multiple flex lines</title> 1.21 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 1.22 + <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines"> 1.23 + <link rel="match" href="flexbox-baseline-multi-line-vert-2-ref.html"> 1.24 + <meta charset="utf-8"> 1.25 + <style> 1.26 + .flexContainer { 1.27 + display: inline-flex; 1.28 + flex-direction: column; 1.29 + flex-wrap: wrap-reverse; 1.30 + width: 40px; 1.31 + height: 40px; 1.32 + background: lightblue; 1.33 + } 1.34 + .flexContainer > * { 1.35 + width: 20px; 1.36 + height: 20px; 1.37 + } 1.38 + 1.39 + /* We'll make the second flex line not paint anything, so that the 1.40 + reference case doesn't need to bother matching it. */ 1.41 + .flexContainer > *:nth-child(3), 1.42 + .flexContainer > *:nth-child(4) { 1.43 + visibility: hidden; 1.44 + } 1.45 + 1.46 + .smallFont { 1.47 + font-size: 8px; 1.48 + line-height: 8px; 1.49 + } 1.50 + .medFont { 1.51 + font-size: 12px; 1.52 + line-height: 12px; 1.53 + } 1.54 + .bigFont { 1.55 + font-size: 16px; 1.56 + line-height: 16px; 1.57 + } 1.58 + </style> 1.59 +</head> 1.60 +<body> 1.61 + a 1.62 + <!-- Flex containers with flex items that have a mix of baselines: --> 1.63 + <div class="flexContainer"> 1.64 + <div class="medFont">b</div 1.65 + ><div class="bigFont">c</div 1.66 + ><div class="bigFont">d</div 1.67 + ><div class="medFont">e</div> 1.68 + </div> 1.69 + 1.70 + <div class="flexContainer"> 1.71 + <div class="bigFont">f</div 1.72 + ><div class="smallFont">g</div 1.73 + ><div class="medFont">h</div 1.74 + ><div class="bigFont">i</div> 1.75 + </div> 1.76 + 1.77 + <!-- Flex container with second line baseline-aligned 1.78 + (shouldn't make a difference) --> 1.79 + <div class="flexContainer"> 1.80 + <div class="smallFont">j</div 1.81 + ><div class="bigFont">k</div 1.82 + ><div class="bigFont" style="align-self: baseline">l</div 1.83 + ><div class="medFont" style="align-self: baseline">m</div> 1.84 + </div> 1.85 + n 1.86 + 1.87 +</body> 1.88 +</html>