layout/reftests/flexbox/flexbox-widget-flex-items-4.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

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 <!--
michael@0 7 This testcase checks that, for any widgets that have a single valid size
michael@0 8 (and hence refuse to flex), we don't stretch them in the cross-axis,
michael@0 9 despite the "align-self: stretch" property.
michael@0 10
michael@0 11 These widgets can be allowed to be resized on some platforms but not others.
michael@0 12 We'll account for that by giving them height: 100% in the reference case,
michael@0 13 so that if they're allowed to stretch, then they'll stretch in both the
michael@0 14 reference case and the testcase.
michael@0 15 -->
michael@0 16 <html>
michael@0 17 <head>
michael@0 18 <style>
michael@0 19 div.flexbox {
michael@0 20 display: flex;
michael@0 21 background: lightgray;
michael@0 22 float: left;
michael@0 23 height: 60px;
michael@0 24 margin-right: 10px;
michael@0 25 }
michael@0 26 div.flexbox > * {
michael@0 27 outline: 1px dashed black;
michael@0 28 margin: 0;
michael@0 29 vertical-align: top;
michael@0 30 height: auto;
michael@0 31 align-self: stretch;
michael@0 32 }
michael@0 33 br { clear: left; }
michael@0 34 </style>
michael@0 35 </head>
michael@0 36 <body>
michael@0 37 <div class="flexbox"><input type="button"></div>
michael@0 38 <div class="flexbox"><input type="checkbox"></div>
michael@0 39 <br>
michael@0 40 <div class="flexbox"><input type="image"></div>
michael@0 41 <div class="flexbox"><input type="radio"></div>
michael@0 42 <br>
michael@0 43 <div class="flexbox"><input type="reset"></div>
michael@0 44 <div class="flexbox"><input type="submit"></div>
michael@0 45 </body>
michael@0 46 </html>

mercurial