Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <!-- Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ --> |
michael@0 | 4 | <!-- Testcase for how we fragment an empty fixed-height flex container, with |
michael@0 | 5 | various combinations of margin/border/padding helping it to be too tall, |
michael@0 | 6 | with the flex container overflowing its fixed-height-block parent, |
michael@0 | 7 | and with the flex container having "flex-direction: row". |
michael@0 | 8 | --> |
michael@0 | 9 | <html> |
michael@0 | 10 | <head> |
michael@0 | 11 | <style> |
michael@0 | 12 | .multicol { |
michael@0 | 13 | height: 10px; |
michael@0 | 14 | width: 100px; |
michael@0 | 15 | -moz-column-width: 20px; |
michael@0 | 16 | -moz-column-fill: auto; |
michael@0 | 17 | border: 2px solid orange; |
michael@0 | 18 | } |
michael@0 | 19 | .fixedHeightBlock { |
michael@0 | 20 | height: 2px; |
michael@0 | 21 | } |
michael@0 | 22 | .flexContainer { |
michael@0 | 23 | display: flex; |
michael@0 | 24 | flex-direction: row; |
michael@0 | 25 | background: teal; |
michael@0 | 26 | /* border-width is 0 by default; some sub-testcases will increase it. */ |
michael@0 | 27 | border: 0 dashed black; |
michael@0 | 28 | } |
michael@0 | 29 | </style> |
michael@0 | 30 | </head> |
michael@0 | 31 | <body> |
michael@0 | 32 | <!-- NO BORDERS/PADDING --> |
michael@0 | 33 | <!-- ================== --> |
michael@0 | 34 | <!-- content fits exactly into 1 column: --> |
michael@0 | 35 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 36 | <div class="flexContainer" style="height: 10px"></div> |
michael@0 | 37 | </div></div> |
michael@0 | 38 | |
michael@0 | 39 | <!-- content fits, but margin-top pushes it to overflow: --> |
michael@0 | 40 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 41 | <div class="flexContainer" style="height: 9px; |
michael@0 | 42 | margin-top: 2px;"></div> |
michael@0 | 43 | </div></div> |
michael@0 | 44 | |
michael@0 | 45 | <!-- content is too tall, by 1px: --> |
michael@0 | 46 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 47 | <div class="flexContainer" style="height: 11px"></div> |
michael@0 | 48 | </div></div> |
michael@0 | 49 | |
michael@0 | 50 | <!-- BORDERS/PADDING ON TOP --> |
michael@0 | 51 | <!-- ====================== --> |
michael@0 | 52 | <!-- content fits, but border-top makes us too tall: --> |
michael@0 | 53 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 54 | <div class="flexContainer" style="height: 9px; |
michael@0 | 55 | border-top-width: 2px"></div> |
michael@0 | 56 | </div></div> |
michael@0 | 57 | |
michael@0 | 58 | <!-- content fits, but padding-top makes us too tall: --> |
michael@0 | 59 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 60 | <div class="flexContainer" style="height: 9px; |
michael@0 | 61 | padding-top: 2px"></div> |
michael@0 | 62 | </div></div> |
michael@0 | 63 | |
michael@0 | 64 | <!-- content fits, but border/padding-top make us too tall: --> |
michael@0 | 65 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 66 | <div class="flexContainer" style="height: 9px; |
michael@0 | 67 | border-top-width: 1px; |
michael@0 | 68 | padding-top: 1px"></div> |
michael@0 | 69 | </div></div> |
michael@0 | 70 | |
michael@0 | 71 | <!-- BORDERS/PADDING ON BOTTOM --> |
michael@0 | 72 | <!-- ========================= --> |
michael@0 | 73 | <!-- content fits, but border-bottom-width makes us too tall: --> |
michael@0 | 74 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 75 | <div class="flexContainer" style="height: 9px; |
michael@0 | 76 | border-bottom-width: 2px"></div> |
michael@0 | 77 | </div></div> |
michael@0 | 78 | |
michael@0 | 79 | <!-- content fits, but padding-bottom makes us too tall: --> |
michael@0 | 80 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 81 | <div class="flexContainer" style="height: 9px; |
michael@0 | 82 | padding-bottom: 2px"></div> |
michael@0 | 83 | </div></div> |
michael@0 | 84 | |
michael@0 | 85 | <!-- content fits, but border/padding-bottom make us too tall: --> |
michael@0 | 86 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 87 | <div class="flexContainer" style="height: 9px; |
michael@0 | 88 | border-bottom-width: 1px; |
michael@0 | 89 | padding-bottom: 1px"></div> |
michael@0 | 90 | </div></div> |
michael@0 | 91 | |
michael@0 | 92 | <!-- BORDERS/PADDING ON TOP AND BOTTOM --> |
michael@0 | 93 | <!-- ================================= --> |
michael@0 | 94 | <!-- content fits, but border-top/bottom combined make us too tall: --> |
michael@0 | 95 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 96 | <div class="flexContainer" style="height: 9px; |
michael@0 | 97 | border-top-width: 1px; |
michael@0 | 98 | border-bottom-width: 1px"></div> |
michael@0 | 99 | </div></div> |
michael@0 | 100 | |
michael@0 | 101 | <!-- content fits, but padding-top/bottom combined make us too tall: --> |
michael@0 | 102 | <div class="multicol"><div class="fixedHeightBlock"> |
michael@0 | 103 | <div class="flexContainer" style="height: 9px; |
michael@0 | 104 | padding-top: 1px; |
michael@0 | 105 | padding-bottom: 1px"></div> |
michael@0 | 106 | </div></div> |
michael@0 | 107 | |
michael@0 | 108 | </body> |
michael@0 | 109 | </html> |