gap-009-ltr-ref.html (825B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Flexbox Test: gap - mixed units</title> 4 <link rel="author" title="Adam Argyle" href="mailto:argyle@google.com"> 5 <style> 6 section { 7 background-color: green; 8 block-size: 100px; 9 display: flex; 10 flex-wrap: wrap; 11 } 12 section > div{ 13 background-color: grey; 14 } 15 section > div { 16 width: calc(50% - .5rem); 17 } 18 section > div:nth-child(1), 19 section > div:nth-child(3) { 20 margin-inline-end: 1rem; 21 } 22 section > div:nth-child(3), 23 section > div:nth-child(4) { 24 margin-block-start: 50px; /* half block size */ 25 } 26 </style> 27 <body> 28 <p>Test passes if there are <strong> 50% horizontal green line and 1rem vertical green line between boxes</strong>.</p> 29 <section> 30 <div></div> 31 <div></div> 32 <div></div> 33 <div></div> 34 </section> 35 </body>