1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-align-self-baseline-horiz-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,62 @@ 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 horizontal flex container 1.10 + with several flex items, some of which have "align-self:baseline". The 1.11 + spec says this about this case: 1.12 + If any of the flex items on the flex container's first line 1.13 + participate in baseline alignment, the flex container's 1.14 + main-axis baseline is the baseline of those flex items. 1.15 +--> 1.16 +<html> 1.17 +<head> 1.18 + <title>CSS Test: Testing the baseline of a horizontal flex container with baseline-aligned flex items</title> 1.19 + <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 1.20 + <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines"> 1.21 + <link rel="match" href="flexbox-baseline-align-self-baseline-horiz-1-ref.html"> 1.22 + <meta charset="utf-8"> 1.23 + <style> 1.24 + body { 1.25 + margin: 0; 1.26 + font-size: 20px; 1.27 + line-height: 20px; 1.28 + } 1.29 + .flexContainer { 1.30 + display: inline-flex; 1.31 + background: lightblue; 1.32 + align-items: baseline; 1.33 + } 1.34 + .hugeAndUnaligned { 1.35 + font-size: 35px; 1.36 + line-height: 35px; 1.37 + /* This one flex item won't be baseline-aligned, so it won't impact 1.38 + the flex container's positioning */ 1.39 + align-self: stretch; 1.40 + } 1.41 + .smallFont { 1.42 + font-size: 10px; 1.43 + line-height: 10px; 1.44 + } 1.45 + </style> 1.46 +</head> 1.47 +<body> 1.48 + a 1.49 + <div class="flexContainer"> 1.50 + <div class="smallFont">b</div> 1.51 + <div>c</div> 1.52 + <div class="hugeAndUnaligned">d</div> 1.53 + </div> 1.54 + <div class="flexContainer"> 1.55 + <div class="hugeAndUnaligned">e</div> 1.56 + <div>f</div> 1.57 + <div class="smallFont">g</div> 1.58 + </div> 1.59 + <div class="flexContainer"> 1.60 + <div class="hugeAndUnaligned">h</div> 1.61 + <div class="smallFont">i</div> 1.62 + <div>j</div> 1.63 + </div> 1.64 +</body> 1.65 +</html>