servo/tests/wpt/css-tests/css-flexbox-1_dev/xhtml1print/flexbox-baseline-multi-line-horiz-004.xht

72 lines
No EOL
2.3 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
--><html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>CSS Test: Testing the baseline of a horizontal multi-line (wrap-reverse) flex container with baseline-aligned items on first line</title>
<link href="mailto:dholbert@mozilla.com" rel="author" title="Daniel Holbert" />
<link href="http://www.w3.org/TR/css-flexbox-1/#flex-baselines" rel="help" />
<link href="reference/flexbox-baseline-multi-line-horiz-004-ref.xht" rel="match" />
<meta charset="utf-8" />
<style>
.flexContainer {
display: inline-flex;
flex-wrap: wrap-reverse;
width: 40px;
height: 100px;
background: lightgray;
/* Use "align-content", to test that packing space is considered when
getting container's baseline from its first FlexLine:*/
align-content: center;
}
.flexContainer &gt; * {
width: 20px;
}
.smallFont {
font-size: 8px;
line-height: 8px;
}
.medFont {
font-size: 12px;
line-height: 12px;
}
.bigFont {
font-size: 16px;
line-height: 16px;
}
</style>
</head>
<body>
a
<!-- Flex container with second item in first line baseline-aligned
(should set the container's baseline) -->
<div class="flexContainer">
<div class="medFont">b</div>
<div style="align-self: baseline" class="bigFont">c</div>
<div class="medFont">d</div>
<div class="smallFont">e</div>
</div>
<!-- Flex container with both items in first line baseline-aligned
(should set the container's baseline) -->
<div class="flexContainer">
<div style="align-self: baseline" class="smallFont">f</div>
<div style="align-self: baseline" class="medFont">g</div>
<div class="bigFont">h</div>
<div class="smallFont">i</div>
</div>
<!-- Flex container with all items baseline-aligned, and with some padding
(only those on first line should set the container's baseline) -->
<div style="align-items: baseline" class="flexContainer">
<div class="bigFont">j</div>
<div style="padding-bottom: 20px" class="smallFont">k</div>
<div class="smallFont">l</div>
<div class="medFont">m</div>
</div>
n
</body></html>