flexbox-align-self-baseline-horiz-3.xhtml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/publicdomain/zero/1.0/
  5. -->
  6. <!-- Testcase for behavior of the 'baseline' value for align-items (and
  7. align-self, implicitly). This test has various types of baseline-aligned
  8. content, and the flexbox's vertical size depends on the aggregate
  9. post-alignment height of its children.
  10. This test checks baseline-alignment for text <button>, for
  11. various <input> fields, for <label>, and for <fieldset>.
  12. -->
  13. <html xmlns="http://www.w3.org/1999/xhtml">
  14. <head>
  15. <style>
  16. .flexbox {
  17. display: flex;
  18. align-items: baseline;
  19. border: 1px dashed blue;
  20. font: 14px sans-serif;
  21. }
  22. .big {
  23. height: 100px;
  24. font: 24px sans-serif;
  25. margin-top: 20px;
  26. }
  27. .lime { background: lime; }
  28. .pink { background: pink; }
  29. .aqua { background: aqua; }
  30. i { display:inline-block; width:20px; height:2px; background:black; }
  31. </style>
  32. </head>
  33. <body>
  34. <div class="flexbox">
  35. <div class="lime">text</div>
  36. <button>btn</button>
  37. <label class="pink">label</label>
  38. <label class="aqua">lab<br/>el</label>
  39. <fieldset>field<br/>set</fieldset>
  40. <fieldset><legend>leg</legend>field<br/>set</fieldset>
  41. <fieldset><legend>leg<br/>end</legend>field<br/>set</fieldset>
  42. </div>
  43. <div class="flexbox" style="font-size:0">
  44. <input type="radio"/>
  45. <input type="checkbox"/>
  46. <i></i>
  47. </div>
  48. </body>
  49. </html>