flex-row-inline-multiline.html (935B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>margin-trim: flex-row-inline-multiline</title> 5 <link rel="author" href="mailto:sammy.gill@apple.com"> 6 <link rel="help" href="https://drafts.csswg.org/css-box-4/#margin-trim-flex"> 7 <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> 8 <meta name="assert" content="inline-start margins are trimmed for items at start of flex line and inline-end margins are trimmed for items at end of flex line"> 9 <style> 10 flexbox { 11 display: flex; 12 width: 100px; 13 flex-wrap: wrap; 14 margin-trim: inline; 15 } 16 item { 17 display: block; 18 background-color: green; 19 width: 50px; 20 height: 50px; 21 } 22 item:nth-child(odd) { 23 margin-inline-start: 25px; 24 } 25 item:nth-child(even) { 26 margin-inline-end: 25px; 27 } 28 </style> 29 </head> 30 <body> 31 <p>Test passes if there is a filled green square.</p> 32 <flexbox> 33 <item></item> 34 <item></item> 35 <item></item> 36 <item></item> 37 </flexbox> 38 </body> 39 </html>