layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-align-self-baseline-vert-1.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <!DOCTYPE html>
michael@0 2 <!--
michael@0 3 Any copyright is dedicated to the Public Domain.
michael@0 4 http://creativecommons.org/publicdomain/zero/1.0/
michael@0 5 -->
michael@0 6 <!-- Testcase for how we compute the baseline of a vertical flex container with
michael@0 7 several flex items, some of which have "align-self:baseline". Since we're
michael@0 8 vertical and the items' baselines are horizontal, they do not end up
michael@0 9 participating in baseline alignment, so their "align-self:baseline"
michael@0 10 computed style doesn't have any special effect on the container's
michael@0 11 baseline.
michael@0 12 -->
michael@0 13 <html>
michael@0 14 <head>
michael@0 15 <title>CSS Test: Testing the baseline of a vertical flex container with baseline-aligned flex items</title>
michael@0 16 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
michael@0 17 <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines">
michael@0 18 <link rel="match" href="flexbox-baseline-align-self-baseline-vert-1-ref.html">
michael@0 19 <meta charset="utf-8">
michael@0 20 <link rel="stylesheet" type="text/css" href="support/ahem.css" />
michael@0 21 <style>
michael@0 22 body {
michael@0 23 margin: 0;
michael@0 24 font: 20px Ahem;
michael@0 25 line-height: 20px;
michael@0 26 /* Baseline is 0.8em = 16px from top */
michael@0 27 }
michael@0 28 .flexContainer {
michael@0 29 display: inline-flex;
michael@0 30 flex-direction: column;
michael@0 31 display: -webkit-inline-flex;
michael@0 32 -webkit-flex-direction: column;
michael@0 33 background: lightblue;
michael@0 34 align-items: baseline;
michael@0 35 }
michael@0 36 .hugeAndUnaligned {
michael@0 37 font-size: 35px;
michael@0 38 line-height: 35px;
michael@0 39 /* This one flex item won't be baseline-aligned, so it won't impact
michael@0 40 the flex container's positioning */
michael@0 41 align-self: stretch;
michael@0 42 }
michael@0 43 .smallFont {
michael@0 44 font-size: 10px;
michael@0 45 line-height: 10px;
michael@0 46 /* Baseline is 0.8em = 8px from top */
michael@0 47 }
michael@0 48 </style>
michael@0 49 </head>
michael@0 50 <body>
michael@0 51 a
michael@0 52 <div class="flexContainer">
michael@0 53 <div class="smallFont">b</div>
michael@0 54 <div>c</div>
michael@0 55 <div class="hugeAndUnaligned">d</div>
michael@0 56 </div>
michael@0 57 <div class="flexContainer">
michael@0 58 <div class="hugeAndUnaligned">e</div>
michael@0 59 <div>f</div>
michael@0 60 <div class="smallFont">g</div>
michael@0 61 </div>
michael@0 62 <div class="flexContainer">
michael@0 63 <div class="hugeAndUnaligned">h</div>
michael@0 64 <div class="smallFont">i</div>
michael@0 65 <div>j</div>
michael@0 66 </div>
michael@0 67 </body>
michael@0 68 </html>

mercurial