|
| 1 | +<!DOCTYPE html> |
| 2 | +<title>CSS Flexbox: flexbox with min-size: auto</title> |
| 3 | +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-containers"> |
| 4 | +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-direction-property"> |
| 5 | +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#min-size-auto"> |
| 6 | +<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-basis-property"> |
| 7 | +<link rel="bookmark" href="https://crbug.com/426898"> |
| 8 | +<link href="support/flexbox.css" rel="stylesheet"> |
| 9 | +<meta name="assert" content="Flexbox with min-size: auto is handled correctly."> |
| 10 | + |
| 11 | +<script src="/resources/testharness.js"></script> |
| 12 | +<script src="/resources/testharnessreport.js"></script> |
| 13 | +<script src="/resources/check-layout-th.js"></script> |
| 14 | + |
| 15 | +<style> |
| 16 | +.flexbox { |
| 17 | + width: 10px; |
| 18 | + height: 10px; |
| 19 | + background-color: grey; |
| 20 | +} |
| 21 | + |
| 22 | +.item { |
| 23 | + background-color: red; |
| 24 | + margin: 5px; |
| 25 | +} |
| 26 | + |
| 27 | +.child { |
| 28 | + height: 100px; |
| 29 | + width: 100px; |
| 30 | + background-color: green; |
| 31 | +} |
| 32 | + |
| 33 | +.width-20 { |
| 34 | + width: 20px; |
| 35 | +} |
| 36 | + |
| 37 | +.flex-basis-20 { |
| 38 | + flex-basis: 20px; |
| 39 | +} |
| 40 | + |
| 41 | +</style> |
| 42 | + |
| 43 | +<body onload="checkLayout('.flexbox, .inline-flexbox');"> |
| 44 | +<div id=log></div> |
| 45 | + |
| 46 | +<div class="flexbox" data-expected-width="10"> |
| 47 | + <div class="item" data-expected-width="100"> |
| 48 | + <div class="child" data-expected-width="100"></div> |
| 49 | + </div> |
| 50 | +</div> |
| 51 | + |
| 52 | +<div class="flexbox column" data-expected-height="10"> |
| 53 | + <div class="item" data-expected-height="100"> |
| 54 | + <div class="child" data-expected-height="100"></div> |
| 55 | + </div> |
| 56 | +</div> |
| 57 | + |
| 58 | +<div class="inline-flexbox column" data-expected-height="110"> |
| 59 | + <div class="item flex-basis-20" data-expected-height="100"> |
| 60 | + <div class="child" data-expected-height="100"></div> |
| 61 | + </div> |
| 62 | +</div> |
| 63 | + |
| 64 | +<div class="flexbox" data-expected-width="10"> |
| 65 | + <div class="item width-20" data-expected-width="20"> |
| 66 | + <div class="child" data-expected-width="100"></div> |
| 67 | + </div> |
| 68 | +</div> |
| 69 | + |
| 70 | +<div class="flexbox" data-expected-width="10"> |
| 71 | + <div class="item flex-basis-20" data-expected-width="100"> |
| 72 | + <div class="child" data-expected-width="100"></div> |
| 73 | + </div> |
| 74 | +</div> |
| 75 | + |
| 76 | +<div class="inline-flexbox" data-expected-width="110"> |
| 77 | + <div class="item flex-basis-20" data-expected-width="100"> |
| 78 | + <div class="child" data-expected-width="100"></div> |
| 79 | + </div> |
| 80 | +</div> |
0 commit comments