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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-min-width-auto-002b.html

Issue 1705363002: Import Mozilla's flexbox tests from csswg-test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test expectations for mac-specific failures Created 4 years, 10 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <!--
3 Any copyright is dedicated to the Public Domain.
4 http://creativecommons.org/publicdomain/zero/1.0/
5 -->
6 <html>
7 <head>
8 <meta charset="utf-8">
9 <title>CSS Test: Testing min-width:auto</title>
10 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com" >
11 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#min-size-auto">
12 <link rel="match" href="flexbox-min-width-auto-002-ref.html">
13 <!--
14 This testcase tests the used value of "min-width:auto" (the property's
15 initial value) on flex items in a horizontal flex container.
16
17 It's supposed to resolve to the smallest of:
18 a) The used 'flex-basis' (taken from 'width'), if 'flex-basis' is at its
19 initial value.
20 b) The computed 'max-width' property
21 c) If there's no intrinsic aspect ratio: the item's min-content width.
22 d) If there is an intrinsic aspect ratio: the item's width derived from
23 the ratio & constraints in the other dimension.
24
25 We measure what the used value is by putting flex items in a small flex
26 container, which will shrink its items down to their min-width.
27
28 This test checks for situations where we should resolve the min-width as
29 (d) above, with "constraints in the other dimension" being "min-height".
30 -->
31 <style>
32 .flexbox {
33 display: flex;
34 width: 0px; /* No available space; shrink flex items to min-width */
35 margin-bottom: 2px; /* (Just for spacing things out, visually) */
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 min-height: 30px;
43 }
44 </style>
45 </head>
46 <body>
47 <!-- Check for min-width:auto resolving correctly when the smallest
48 candidate value is: -->
49
50 <!-- *** (d) (with intrinsic aspect ratio) The width derived from ratio
51 and constraints in the other dimension *** -->
52 <!-- First, with a larger candidate 'flex-basis' value (from 'width') -->
53 <div class="flexbox">
54 <img style="width: 100px" src="support/solidblue.png" alt="blue square">
55 </div>
56 <!-- ...and now with a larger explicit 'flex-basis' value (which shouldn't
57 be considered for 'min-width:auto' anyway) -->
58 <div class="flexbox">
59 <img style="flex-basis: 100px" src="support/solidblue.png" alt="blue squar e">
60 </div>
61 <!-- ...and now with a smaller explicit 'flex-basis' value (which shouldn't
62 be considered for 'min-width:auto' anyway) -->
63 <div class="flexbox">
64 <img style="flex-basis: 10px" src="support/solidblue.png" alt="blue square ">
65 </div>
66 </body>
67 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698