flexbox-empty-2-ref.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. margin/border/padding that are larger than the available height,
  6. and with the flex container having "flex-direction: row".
  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. margin-bottom: 2px;
  18. }
  19. .flexContainer {
  20. background: teal;
  21. /* border-width is 0 by default; some sub-testcases will increase it. */
  22. border: 0 dashed black;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <!-- MARGIN LARGER THAN AVAILABLE HEIGHT -->
  28. <!-- =================================== -->
  29. <!-- margin-top is the available height: -->
  30. <div class="multicol">
  31. <div class="flexContainer" style="height: 8px;
  32. margin-top: 10px"></div>
  33. </div>
  34. <!-- margin-top is larger than available height: -->
  35. <div class="multicol">
  36. <div class="flexContainer" style="height: 8px;
  37. margin-top: 11px"></div>
  38. </div>
  39. <!-- margin-bottom is exactly the available height: -->
  40. <div class="multicol">
  41. <div class="flexContainer" style="height: 8px;
  42. margin-bottom: 10px"></div>
  43. </div>
  44. <!-- margin-bottom is larger than available height: -->
  45. <div class="multicol">
  46. <div class="flexContainer" style="height: 8px;
  47. margin-bottom: 11px"></div>
  48. </div>
  49. <!-- BORDER LARGER THAN AVAILABLE HEIGHT -->
  50. <!-- =================================== -->
  51. <!-- border-top-width is the available height: -->
  52. <div class="multicol">
  53. <div class="flexContainer" style="height: 8px;
  54. border-top-width: 10px"></div>
  55. </div>
  56. <!-- border-top-width is larger than available height: -->
  57. <div class="multicol">
  58. <div class="flexContainer" style="height: 8px;
  59. border-top-width: 11px"></div>
  60. </div>
  61. <!-- border-bottom-width is exactly the available height: -->
  62. <div class="multicol">
  63. <div class="flexContainer" style="height: 8px;
  64. border-bottom-width: 10px"></div>
  65. </div>
  66. <!-- border-bottom-width is larger than available height: -->
  67. <div class="multicol">
  68. <div class="flexContainer" style="height: 8px;
  69. border-bottom-width: 11px"></div>
  70. </div>
  71. <!-- PADDING LARGER THAN AVAILABLE HEIGHT -->
  72. <!-- ==================================== -->
  73. <!-- padding-top is the available height: -->
  74. <div class="multicol">
  75. <div class="flexContainer" style="height: 8px;
  76. padding-top: 10px"></div>
  77. </div>
  78. <!-- padding-top is larger than available height: -->
  79. <div class="multicol">
  80. <div class="flexContainer" style="height: 8px;
  81. padding-top: 11px"></div>
  82. </div>
  83. <!-- padding-bottom is exactly the available height: -->
  84. <div class="multicol">
  85. <div class="flexContainer" style="height: 8px;
  86. padding-bottom: 10px"></div>
  87. </div>
  88. <!-- padding-bottom is larger than available height: -->
  89. <div class="multicol">
  90. <div class="flexContainer" style="height: 8px;
  91. padding-bottom: 11px"></div>
  92. </div>
  93. <!-- BORDER+PADDING LARGER THAN AVAILABLE HEIGHT -->
  94. <!-- =========================================== -->
  95. <!-- border+padding-top is the available height: -->
  96. <div class="multicol">
  97. <div class="flexContainer" style="height: 8px;
  98. border-top: 5px;
  99. padding-top: 5px"></div>
  100. </div>
  101. <!-- padding-top is larger than available height: -->
  102. <div class="multicol">
  103. <div class="flexContainer" style="height: 8px;
  104. border-top: 6px;
  105. padding-top: 6px"></div>
  106. </div>
  107. <!-- padding-bottom is exactly the available height: -->
  108. <div class="multicol">
  109. <div class="flexContainer" style="height: 8px;
  110. border-bottom: 5px;
  111. padding-bottom: 5px"></div>
  112. </div>
  113. <!-- padding-bottom is larger than available height: -->
  114. <div class="multicol">
  115. <div class="flexContainer" style="height: 8px;
  116. border-bottom: 6px;
  117. padding-bottom: 6px"></div>
  118. </div>
  119. </body>
  120. </html>