Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
michael@0 | 2 | <!-- |
michael@0 | 3 | Any copyright is dedicated to the Public Domain. |
michael@0 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 5 | --> |
michael@0 | 6 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 7 | <head> |
michael@0 | 8 | <style> |
michael@0 | 9 | div.flexbox { |
michael@0 | 10 | width: 200px; |
michael@0 | 11 | font-size: 8px; |
michael@0 | 12 | } |
michael@0 | 13 | div.outerContainer { |
michael@0 | 14 | border: 1px dotted black; |
michael@0 | 15 | height: 42px; |
michael@0 | 16 | margin-bottom: 5px; |
michael@0 | 17 | } |
michael@0 | 18 | div.flexbox > * { |
michael@0 | 19 | vertical-align: top; |
michael@0 | 20 | display: inline-block; |
michael@0 | 21 | margin-right: 20px; |
michael@0 | 22 | border: 1px dashed green; |
michael@0 | 23 | background: lightblue; |
michael@0 | 24 | height: 40px; |
michael@0 | 25 | } |
michael@0 | 26 | div.childMinSizeIsMinContent > * { |
michael@0 | 27 | min-width: -moz-min-content; |
michael@0 | 28 | } |
michael@0 | 29 | div.childSizeIsMinContent > * { |
michael@0 | 30 | width: -moz-min-content; |
michael@0 | 31 | } |
michael@0 | 32 | div.smallSize { width: 5px; } |
michael@0 | 33 | div.smallFlexBasis { width: 2px; } |
michael@0 | 34 | div.zeroWidth { width: 0; } |
michael@0 | 35 | |
michael@0 | 36 | </style> |
michael@0 | 37 | </head> |
michael@0 | 38 | <body> |
michael@0 | 39 | |
michael@0 | 40 | <!-- Check that we use the min-content width as a lower-bound when sizing |
michael@0 | 41 | flex items. --> |
michael@0 | 42 | <div class="flexbox childMinSizeIsMinContent outerContainer"> |
michael@0 | 43 | <div>abc d e f</div |
michael@0 | 44 | ><div class="smallSize">abc d e f</div |
michael@0 | 45 | ><div class="smallFlexBasis">abc d e f</div> |
michael@0 | 46 | </div> |
michael@0 | 47 | |
michael@0 | 48 | <!-- ... EVEN if our flex container is small and we're overflowing. --> |
michael@0 | 49 | <div class="outerContainer smallSize"> |
michael@0 | 50 | <div class="flexbox childSizeIsMinContent"> |
michael@0 | 51 | <div>abc d e f</div |
michael@0 | 52 | ><div>abc d e f</div |
michael@0 | 53 | ><div>abc d e f</div> |
michael@0 | 54 | </div> |
michael@0 | 55 | </div> |
michael@0 | 56 | |
michael@0 | 57 | <!-- Test that "min-width: 0" on flex items will keep us from clamping to |
michael@0 | 58 | the min-content width. (So we can now actually honor small 'width' |
michael@0 | 59 | and 'flex-basis' values.) --> |
michael@0 | 60 | <div class="flexbox outerContainer"> |
michael@0 | 61 | <div>abc d e f</div |
michael@0 | 62 | ><div class="smallSize">abc d e f</div |
michael@0 | 63 | ><div class="smallFlexBasis">abc d e f</div> |
michael@0 | 64 | </div> |
michael@0 | 65 | |
michael@0 | 66 | <!-- ... and similarly, when we have a small flex container and we trigger |
michael@0 | 67 | shrinking behavior, flex items with "min-width: 0" are allowed to |
michael@0 | 68 | shrink past their min-content width. --> |
michael@0 | 69 | <div class="outerContainer smallSize"> |
michael@0 | 70 | <div class="flexbox"> |
michael@0 | 71 | <div class="zeroWidth">abc d e f</div |
michael@0 | 72 | ><div class="zeroWidth">abc d e f</div |
michael@0 | 73 | ><div class="zeroWidth">abc d e f</div> |
michael@0 | 74 | </div> |
michael@0 | 75 | </div> |
michael@0 | 76 | |
michael@0 | 77 | </body> |
michael@0 | 78 | </html> |