OLD | NEW |
(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-height:auto & 'overflow' interaction</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-height-auto-003-ref.html"> |
| 13 <!-- |
| 14 This testcase checks how "overflow-y" impacts the sizing behavior of flex |
| 15 items with "min-height:auto" (the new initial value for "min-height"). |
| 16 |
| 17 In particular, the flex-item-specific "min-height:auto" behavior is |
| 18 supposed to be disabled (e.g. we end up with min-height:0) when |
| 19 "overflow-y" is non-"visible". |
| 20 --> |
| 21 <style> |
| 22 .flexbox { |
| 23 display: flex; |
| 24 flex-direction: column; |
| 25 height: 30px; /* Shrink flex items below min-height */ |
| 26 margin-right: 2px; /* (Just for spacing things out, visually) */ |
| 27 float: left; |
| 28 } |
| 29 |
| 30 .flexbox > * { |
| 31 /* Flex items have purple border: */ |
| 32 border: 2px dotted purple; |
| 33 } |
| 34 |
| 35 .flexbox > * > * { |
| 36 /* Flex items' contents are gray & fixed-size: */ |
| 37 background: gray; |
| 38 width: 40px; |
| 39 height: 80px; |
| 40 } |
| 41 |
| 42 .yvisible { overflow-y: visible; } |
| 43 .yhidden { overflow-y: hidden; } |
| 44 .yscroll { overflow-y: scroll; } |
| 45 .yauto { overflow-y: auto; } |
| 46 </style> |
| 47 </head> |
| 48 <body> |
| 49 <!-- min-height:auto should prevent shrinking below intrinsic height when |
| 50 the flex item has "overflow-y: visible", but not for any other |
| 51 overflow-y values. --> |
| 52 <div class="flexbox"><div class="yvisible"><div></div></div></div> |
| 53 <div class="flexbox"><div class="yhidden"><div></div></div></div> |
| 54 <div class="flexbox"><div class="yscroll"><div></div></div></div> |
| 55 <div class="flexbox"><div class="yauto"><div></div></div></div> |
| 56 </body> |
| 57 </html> |
OLD | NEW |