flexbox-empty-1h.html 4.1 KB

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