flexbox-empty-1c.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. and with the flex container having "flex-direction: column".
  7. -->
  8. <html>
  9. <head>
  10. <style>
  11. .multicol {
  12. height: 10px;
  13. width: 100px;
  14. -moz-column-width: 20px;
  15. -moz-column-fill: auto;
  16. border: 2px solid orange;
  17. }
  18. .flexContainer {
  19. display: flex;
  20. flex-direction: column;
  21. background: teal;
  22. /* border-width is 0 by default; some sub-testcases will increase it. */
  23. border: 0 dashed black;
  24. }
  25. </style>
  26. </head>
  27. <body>
  28. <!-- NO BORDERS/PADDING -->
  29. <!-- ================== -->
  30. <!-- content fits exactly into 1 column: -->
  31. <div class="multicol">
  32. <div class="flexContainer" style="height: 10px"></div>
  33. </div>
  34. <!-- content fits, but margin-top pushes it to overflow: -->
  35. <div class="multicol">
  36. <div class="flexContainer" style="height: 9px;
  37. margin-top: 2px;"></div>
  38. </div>
  39. <!-- content is too tall, by 1px: -->
  40. <div class="multicol">
  41. <div class="flexContainer" style="height: 11px"></div>
  42. </div>
  43. <!-- BORDERS/PADDING ON TOP -->
  44. <!-- ====================== -->
  45. <!-- content fits, but border-top makes us too tall: -->
  46. <div class="multicol">
  47. <div class="flexContainer" style="height: 9px;
  48. border-top-width: 2px"></div>
  49. </div>
  50. <!-- content fits, but padding-top makes us too tall: -->
  51. <div class="multicol">
  52. <div class="flexContainer" style="height: 9px;
  53. padding-top: 2px"></div>
  54. </div>
  55. <!-- content fits, but border/padding-top make us too tall: -->
  56. <div class="multicol">
  57. <div class="flexContainer" style="height: 9px;
  58. border-top-width: 1px;
  59. padding-top: 1px"></div>
  60. </div>
  61. <!-- BORDERS/PADDING ON BOTTOM -->
  62. <!-- ========================= -->
  63. <!-- content fits, but border-bottom-width makes us too tall: -->
  64. <div class="multicol">
  65. <div class="flexContainer" style="height: 9px;
  66. border-bottom-width: 2px"></div>
  67. </div>
  68. <!-- content fits, but padding-bottom makes us too tall: -->
  69. <div class="multicol">
  70. <div class="flexContainer" style="height: 9px;
  71. padding-bottom: 2px"></div>
  72. </div>
  73. <!-- content fits, but border/padding-bottom make us too tall: -->
  74. <div class="multicol">
  75. <div class="flexContainer" style="height: 9px;
  76. border-bottom-width: 1px;
  77. padding-bottom: 1px"></div>
  78. </div>
  79. <!-- BORDERS/PADDING ON TOP AND BOTTOM -->
  80. <!-- ================================= -->
  81. <!-- content fits, but border-top/bottom combined make us too tall: -->
  82. <div class="multicol">
  83. <div class="flexContainer" style="height: 9px;
  84. border-top-width: 1px;
  85. border-bottom-width: 1px"></div>
  86. </div>
  87. <!-- content fits, but padding-top/bottom combined make us too tall: -->
  88. <div class="multicol">
  89. <div class="flexContainer" style="height: 9px;
  90. padding-top: 1px;
  91. padding-bottom: 1px"></div>
  92. </div>
  93. </body>
  94. </html>