flexbox-unbreakable-child-2-ref.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 a flex container with several children in a
  5. multi-line vertical flexbox.
  6. -->
  7. <html>
  8. <head>
  9. <style>
  10. .multicol {
  11. height: 40px;
  12. width: 100px;
  13. -moz-column-width: 60px;
  14. -moz-column-fill: auto;
  15. border: 2px solid purple;
  16. margin-bottom: 15px; /* (just for spacing between testcases) */
  17. }
  18. .flexContainer {
  19. background: yellow;
  20. border: 1px dashed black;
  21. }
  22. .item {
  23. width: 40px;
  24. height: 15px;
  25. border: 1px dotted teal;
  26. margin: 1px;
  27. font: 10px serif;
  28. float: left;
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <!-- auto-height container: -->
  34. <div class="multicol">
  35. <div class="flexContainer" style="height: 38px">
  36. <div class="item">1</div>
  37. <div class="item">3</div>
  38. <div class="item">2</div>
  39. </div>
  40. </div>
  41. <!-- auto-height container, with enough children that our last flex line
  42. overflows (in the cross axis) -->
  43. <!-- XXXdholbert Ultimately (in bug 939897 probably) we should push the
  44. overflowing flex line to a continuation of the flex container -->
  45. <div class="multicol">
  46. <div class="flexContainer" style="height: 38px">
  47. <div style="width: 132px">
  48. <div class="item">1</div>
  49. <div class="item">3</div>
  50. <div class="item">5</div>
  51. <div class="item">2</div>
  52. <div class="item">4</div>
  53. </div>
  54. </div>
  55. </div>
  56. <!-- fixed-height container-->
  57. <div class="multicol">
  58. <div class="flexContainer" style="height: 70px">
  59. <div class="item">1</div>
  60. <div class="item">3</div>
  61. <div class="item">2</div>
  62. </div>
  63. </div>
  64. <!-- fixed-height container, with enough children that our last flex line
  65. overflows (in the cross axis) -->
  66. <!-- XXXdholbert Ultimately (in bug 939897 probably) we should push the
  67. overflowing flex line to a continuation of the flex container -->
  68. <div class="multicol">
  69. <div class="flexContainer" style="height: 70px">
  70. <div style="width: 132px">
  71. <div class="item">1</div>
  72. <div class="item">3</div>
  73. <div class="item">5</div>
  74. <div class="item">2</div>
  75. <div class="item">4</div>
  76. </div>
  77. </div>
  78. </div>
  79. </body>
  80. </html>