column-justify-items-end-justify-self-start-001.html (1291B)
1 <!DOCTYPE html> 2 <html> 3 <title>CSS Grid Lanes Test: Alignment for items and self in grid axis</title> 4 <link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com"> 5 <link rel="help" href="https://drafts.csswg.org/css-grid-3/#alignment"> 6 <link rel="match" href="column-justify-items-end-justify-self-start-001-ref.html"> 7 <style> 8 .grid-lanes { 9 display: grid-lanes; 10 background: gray; 11 position: relative; 12 flow-tolerance: 0; 13 grid-template-columns: repeat(3, 100px); 14 width: 300px; 15 justify-items: end; 16 } 17 18 .fifty-width { 19 width: 50px; 20 background-color: lightblue; 21 } 22 </style> 23 <body> 24 <p>Test that using justify-items moves each grid-lanes item to the end of the grid-axis track it is on</p> 25 <p>and that justify-self overrides justify-items.</p> 26 <div class="grid-lanes"> 27 <div class="fifty-width"> 28 This is some text 29 </div> 30 <div class="fifty-width" style="justify-self: start"> 31 Some larger words in this sentence 32 </div> 33 <div class="fifty-width"> 34 The cat cannot be taken from milk 35 </div> 36 <div style="background-color: lightpink; width: fit-content;"> 37 This is text 38 </div> 39 <div style="background-color: lightpink; width: fit-content;"> 40 This is text 41 </div> 42 </div> 43 </body> 44 </html>