flexbox-table-flex-items-1.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE HTML>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/publicdomain/zero/1.0/
  5. -->
  6. <html><head>
  7. <meta charset="utf-8">
  8. <title>CSS Flexbox Test: caption size test for table flex items</title>
  9. <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1334403">
  10. <link rel="help" href="https://drafts.csswg.org/css-align-3/#valdef-justify-self-normal">
  11. <link rel="match" href="flexbox-table-flex-items-1.html">
  12. <style type="text/css">
  13. * { vertical-align: top; }
  14. .flex {
  15. display: inline-flex;
  16. border: 3px solid grey;
  17. height: 73px;
  18. width: 110px;
  19. align-items: start; /* no support for stretch yet: bug 799725 */
  20. }
  21. table {
  22. border: 1px solid;
  23. padding: 0;
  24. margin: 0;
  25. background: lightgrey;
  26. flex: auto;
  27. min-width: 0;
  28. min-height: 0;
  29. }
  30. caption { border: 1px dashed blue;}
  31. x { display:block; width:16px; height:16px; }
  32. t { display:block; width:30px; height:20px; }
  33. i:nth-of-type(1) { width:10px; height:20px; }
  34. i:nth-of-type(2) { width:20px; height:10px; }
  35. .hma10 { margin: 7px 3px 1px auto; }
  36. .hmaa { margin: 7px auto 1px auto; }
  37. .vma10 { margin: auto 7px 3px 1px; }
  38. .vmaa { margin: auto 7px auto 1px; }
  39. .vr { writing-mode: vertical-rl; }
  40. </style>
  41. </head>
  42. <body>
  43. <div class="flex"><i></i><table cellpadding=0 cellspacing=0 class="hma10"><caption><x></x></caption><td><t></t></td></table></div>
  44. <div class="flex"><i></i><table cellpadding=0 cellspacing=0 class="hmaa"><caption><x></x></caption><td><t></t></td></table><i></i></div>
  45. <div class="flex"><i></i><table cellpadding=0 cellspacing=0 class="vma10"><caption><x></x></caption><td><t></t></td></table><i></i></div>
  46. <div class="flex"><i></i><table cellpadding=0 cellspacing=0 class="vmaa"><caption><x></x></caption><td><t></t></td></table><i></i></div>
  47. <div class="flex"><i></i><table cellpadding=0 cellspacing=0><caption class="hma10"><x></x></caption><td><t></t></td></table><i></i></div>
  48. <div class="flex"><i></i><table cellpadding=0 cellspacing=0><caption class="hmaa"><x></x></caption><td><t></t></td></table><i></i></div>
  49. <div class="flex"><i></i><table cellpadding=0 cellspacing=0><caption class="vma10"><x></x></caption><td><t></t></td></table><i></i></div>
  50. <div class="flex"><i></i><table cellpadding=0 cellspacing=0><caption class="vmaa"><x></x></caption><td><t></t></td></table><i></i></div>
  51. <!-- for generating the result for the -ref file
  52. <script>
  53. let sizes = "let sizes = [\n";
  54. Array.prototype.slice.call(document.querySelectorAll('.flex > table > caption')).map((e) => {
  55. let cs = window.getComputedStyle(e);
  56. sizes += ' [ "' + cs.width +'", "' + cs.height + '" ],\n';
  57. });
  58. sizes += "];\n";
  59. console.log(sizes);
  60. </script>
  61. -->
  62. </body>
  63. </html>