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