flex_inline.rml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <rml>
  2. <head>
  3. <title>Inline flexboxes</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#flex-baselines" />
  6. <meta name="Description" content="Inline flexboxes. The baseline of a flex container is simply set to its first flex item that has a baseline." />
  7. <style>
  8. .flex {
  9. display: inline-flex;
  10. background-color: #555;
  11. margin: 1em 0.5em;
  12. border: 2dp #333;
  13. justify-content: space-between;
  14. color: #d44fff;
  15. width: 170dp;
  16. }
  17. .flex div {
  18. flex: 0 1 auto;
  19. width: 35dp;
  20. height: 30dp;
  21. margin: 5dp 8dp;
  22. background-color: #eee;
  23. line-height: 30dp;
  24. text-align: center;
  25. }
  26. .wrap {
  27. flex-wrap: wrap;
  28. width: 115dp;
  29. }
  30. .column {
  31. flex-direction: column;
  32. width: 70dp;
  33. align-items: center;
  34. }
  35. </style>
  36. </head>
  37. <body>
  38. <p>
  39. Can we
  40. <div class="flex">
  41. <div>A</div>
  42. <div>B</div>
  43. <div>C</div>
  44. </div>
  45. play
  46. <div class="flex wrap">
  47. <div>A</div>
  48. <div>B</div>
  49. <div>C</div>
  50. </div>
  51. Tetris
  52. <div class="flex column">
  53. <div>A</div>
  54. <div>B</div>
  55. <div>C</div>
  56. </div>
  57. with flexboxes
  58. <div class="flex">
  59. <div>A</div>
  60. <div>B</div>
  61. <div>C</div>
  62. </div>
  63. ?
  64. </p>
  65. <handle size_target="#document"/>
  66. </body>
  67. </rml>