flex_nested.rml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <rml>
  2. <head>
  3. <title>Flex - Nested flex boxes</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <link rel="match" href="reference/flex_nested-ref.rml"/>
  6. <link rel="GitHub issue #320" href="https://github.com/mikke89/RmlUi/issues/320" />
  7. <meta name="Description" content="Flex items should support flex layout." />
  8. <meta name="Assert" content="All items should be located on a single line, and there should be no holes between them." />
  9. <style>
  10. #window
  11. {
  12. display: flex;
  13. width: 100%;
  14. height: 100%;
  15. overflow: hidden auto;
  16. flex-direction: row;
  17. justify-content: center;
  18. flex-wrap: nowrap;
  19. }
  20. .content
  21. {
  22. display: flex;
  23. height: 128px;
  24. width: 40%;
  25. text-align: center;
  26. flex-direction: row;
  27. }
  28. </style>
  29. </head>
  30. <body>
  31. <div id="window">
  32. <div class="content">
  33. <div style="width: 20%; background: red;">1</div>
  34. <div style="width: 60%; background: green;">2</div>
  35. <div style="width: 20%; background: blue;">3</div>
  36. </div>
  37. <div class="content">
  38. <div style="width: 20%; background: red;">1</div>
  39. <div style="width: 60%; background: green;">2</div>
  40. <div style="width: 20%; background: blue;">3</div>
  41. </div>
  42. </div>
  43. <handle size_target="#document"/>
  44. </body>
  45. </rml>