1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-multi-item-vert-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,57 @@ 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 items, none of which have "align-self:baseline". The 1.11 + spec says this about this case: 1.12 + ...if the flex container has at least one flex item, and its 1.13 + first flex item has a baseline parallel to the flex 1.14 + container's main axis, the flex container's main-axis 1.15 + baseline is that baseline. 1.16 +--> 1.17 +<html> 1.18 +<head> 1.19 + <title>CSS Test: Testing the baseline of a vertical flex container whose flex items are not baseline-aligned</title> 1.20 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 1.21 + <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines"> 1.22 + <link rel="match" href="flexbox-baseline-multi-item-vert-1-ref.html"> 1.23 + <meta charset="utf-8"> 1.24 + <link rel="stylesheet" type="text/css" href="support/ahem.css" /> 1.25 + <style> 1.26 + body { 1.27 + margin: 0; 1.28 + font: 20px Ahem; 1.29 + line-height: 20px; 1.30 + /* Baseline is 0.8em = 16px from top */ 1.31 + } 1.32 + .flexContainer { 1.33 + display: inline-flex; 1.34 + flex-direction: column; 1.35 + background: lightblue; 1.36 + } 1.37 + .smallFont { 1.38 + font-size: 10px; 1.39 + line-height: 10px; 1.40 + /* Baseline is 0.8em = 8px from top */ 1.41 + } 1.42 + .bigFont { 1.43 + font-size: 20px; 1.44 + line-height: 20px; 1.45 + /* Baseline is 0.8em = 16px from top */ 1.46 + } 1.47 + </style> 1.48 +</head> 1.49 +<body> 1.50 + a 1.51 + <div class="flexContainer"> 1.52 + <div class="smallFont">b</div 1.53 + ><div class="bigFont">c</div> 1.54 + </div> 1.55 + <div class="flexContainer"> 1.56 + <div class="bigFont">d</div 1.57 + ><div class="smallFont">e</div> 1.58 + </div> 1.59 +</body> 1.60 +</html>