flexbox-widget-flex-items-4.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/publicdomain/zero/1.0/
  5. -->
  6. <!--
  7. This testcase checks that, for any widgets that have a single valid size
  8. (and hence refuse to flex), we don't stretch them in the cross-axis,
  9. despite the "align-self: stretch" property.
  10. These widgets can be allowed to be resized on some platforms but not others.
  11. We'll account for that by giving them height: 100% in the reference case,
  12. so that if they're allowed to stretch, then they'll stretch in both the
  13. reference case and the testcase.
  14. -->
  15. <html>
  16. <head>
  17. <style>
  18. div.flexbox {
  19. display: flex;
  20. background: lightgray;
  21. float: left;
  22. height: 60px;
  23. margin-right: 10px;
  24. }
  25. div.flexbox > * {
  26. outline: 1px dashed black;
  27. margin: 0;
  28. vertical-align: top;
  29. height: auto;
  30. align-self: stretch;
  31. }
  32. br { clear: left; }
  33. </style>
  34. </head>
  35. <body>
  36. <div class="flexbox"><input type="button"></div>
  37. <div class="flexbox"><input type="checkbox"></div>
  38. <br>
  39. <div class="flexbox"><input type="image"></div>
  40. <div class="flexbox"><input type="radio"></div>
  41. <br>
  42. <div class="flexbox"><input type="reset"></div>
  43. <div class="flexbox"><input type="submit"></div>
  44. </body>
  45. </html>