Status: FAIL | Duration: 24ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-grid/grid-lanes/alignment/column-justify-items-center-001.html
<!DOCTYPE html> <html> <meta charset="utf-8"> <title>CSS Grid Lanes Test: Centered alignment in grid axis</title> <link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-3/#alignment"> <link rel="match" href="column-justify-items-center-001-ref.html"> <style> .grid-lanes { display: grid-lanes; background: gray; position: relative; flow-tolerance: 0; grid-template-columns: repeat(3, 100px); width: 300px; justify-items: center; } .fifty-width { width: 50px; background-color: lightblue; } </style> <body> <p>Test that using justify-items centers each item to the grid-axis track it is on.</p> <div class="grid-lanes"> <div class="fifty-width"> This is some text </div> <div class="fifty-width"> Some larger words in this sentence </div> <div class="fifty-width"> The cat cannot be taken from milk </div> <div style="background-color: lightpink; width: fit-content;"> This is text </div> <div style="background-color: lightpink; width: fit-content;"> This is text </div> </div> </body> </html>
/css/css-grid/grid-lanes/alignment/column-justify-items-center-001-ref.html
<!DOCTYPE html> <html> <style> .grid { display: grid; grid-template-columns: repeat(3, 100px); background: gray; width: 300px; align-items: start; justify-items: center; } .flex { display: flex; align-items: center; flex-direction: column; } .two-span-item { background-color: lightpink; } .fifty-width { width: 50px; background-color: lightblue; } </style> <body> <p>Test that using justify-items centers each item to the grid-axis track it is on.</p> <div class="grid"> <div class="flex"> <div class="fifty-width"> This is some text </div> <div class="two-span-item"> This is text </div> <div class="two-span-item"> This is text </div> </div> <div class="fifty-width"> Some larger words in this sentence </div> <div class="fifty-width"> The cat cannot be taken from milk </div> </div> </body> </html>