Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Side by Side Diff: LayoutTests/css3/flexbox/flexbox-min-height-auto-002a.htm

Issue 988523003: Reimplement min-width: auto (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 Any copyright is dedicated to the Public Domain.
4 http://creativecommons.org/publicdomain/zero/1.0/
5 --><html><head>
6 <meta charset="utf-8">
7 <title>CSS Test: Testing min-height:auto</title>
8 <link href="mailto:dholbert@mozilla.com" rel="author" title="Daniel Holbert" >
9 <link href="http://www.w3.org/TR/css-flexbox-1/#min-size-auto" rel="help">
10 <link href="reference/flexbox-min-height-auto-002-ref.htm" rel="match">
11 <!--
12 This testcase tests the used value of "min-height:auto" (the property's
13 initial value) on flex items in a vertical flex container.
14
15 It's supposed to resolve to the smallest of:
16 a) The used 'flex-basis' (taken from 'height'), if 'flex-basis' is at its
17 initial value.
18 b) The computed 'max-height' property
19 c) If there's no intrinsic aspect ratio: the item's min-content height.
20 d) If there is an intrinsic aspect ratio: the item's height derived from
21 the ratio & constraints in the other dimension.
22
23 We measure what the used value is by putting flex items in a small flex
24 container, which will shrink its items down to their min-height.
25
26 This test checks for situations where we should resolve the min-height as
27 (d) above, with "constraints in the other dimension" being "width".
28 -->
29 <style>
30 .flexbox {
31 display: flex;
32 flex-direction: column;
33 height: 1px; /* No available space; shrink flex items to min-height */
34 margin-right: 2px; /* (Just for spacing things out, visually) */
35 float: left;
36 }
37
38 .flexbox > * {
39 /* Flex items have purple border: */
40 border: 2px dotted purple;
41 /* Flex items have sizing constraint in cross axis: */
42 width: 30px;
43 }
44 </style>
45 </head>
46 <body>
47 <!-- Check for min-height:auto resolving correctly when the smallest
48 candidate value is: -->
49
50 <!-- *** (d) (with intrinsic aspect ratio) The height derived from ratio
51 and constraints in the other dimension *** -->
52 <!-- First, with a larger candidate 'flex-basis' value (from 'height') -->
53 <div class="flexbox">
54 <img src="support/solidblue.png" alt="blue square" style="height: 100px">
55 </div>
56 <!-- ...and now with a larger explicit 'flex-basis' value (which shouldn't
57 be considered for 'min-height:auto' anyway) -->
58 <div class="flexbox">
59 <img src="support/solidblue.png" alt="blue square" style="flex-basis: 100p x">
60 </div>
61 <!-- ...and now with a smaller explicit 'flex-basis' value (which shouldn't
62 be considered for 'min-height:auto' anyway) -->
63 <div class="flexbox">
64 <img src="support/solidblue.png" alt="blue square" style="flex-basis: 10px ">
65 </div>
66
67
68 </body></html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698