Status: FAIL | Duration: 15ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-grid/grid-lanes/alignment/row-dense-packing-justify-items-001.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS Grid Lanes Test: justify-items start and end in row direction with dense-packed item</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="help" href="https://drafts.csswg.org/css-grid-3/#grid-lanes-dense-packing"> <link rel="match" href="row-dense-packing-justify-items-001-ref.html"> <style> html, body { color: black; background-color: white; font: 16px/1 monospace; padding: 0; margin: 0; } .grid-lanes { display: grid-lanes; grid-lanes-direction: row; grid-template-rows: repeat(3, 60px); grid-lanes-pack: dense; padding: 2px; margin: 5px; } item { display: block; color: white; } </style> </head> <body> <div class="grid-lanes" style="justify-items: start;"> <item style="width: 20px; background: salmon; grid-row: 1 / span 2;">0</item> <item style="width: 80px; background: salmon; grid-row: 1;">1</item> <item style="width: 30px; background: salmon; grid-row: 1 / span 2;">2</item> <item style="width: 80px; background: salmon; grid-row: 3;">4</item> <item style="width: 20px; background: salmon; grid-row: 1 / span 3;">5</item> <item style="width: 40px; background: green; grid-row: 2;">3</item> <item style="width: 30px; background: green; grid-row: 3;">6</item> </div> <div class="grid-lanes" style="justify-items: end;"> <item style="width: 20px; background: salmon; grid-row: 1 / span 2;">0</item> <item style="width: 80px; background: salmon; grid-row: 1;">1</item> <item style="width: 30px; background: salmon; grid-row: 1 / span 2;">2</item> <item style="width: 80px; background: salmon; grid-row: 3;">4</item> <item style="width: 20px; background: salmon; grid-row: 1 / span 3;">5</item> <item style="width: 40px; background: green; grid-row: 2;">3</item> <item style="width: 30px; background: green; grid-row: 3;">6</item> </div> </body> </html>
/css/css-grid/grid-lanes/alignment/row-dense-packing-justify-items-001-ref.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> html, body { color: black; background-color: white; font: 16px/1 monospace; padding: 0; margin: 0; } .grid { display: grid; grid-template-rows: repeat(3, 60px); grid-template-columns: 20px 80px 30px 20px; padding: 2px; margin: 5px; } .grid-end { display: grid; grid-template-rows: repeat(3, 60px); grid-template-columns: 20px 80px 30px 1fr 20px; padding: 2px; margin: 5px; } .track { display: flex; flex-direction: row; } item { display: block; color: white; } </style> </head> <body> <div class="grid"> <item style="grid-row: 1 / span 2; grid-column: 1; width: 20px; background: salmon;">0</item> <div class="track" style="grid-row: 1; grid-column: 2;"> <item style="width: 80px; height: 60px; background: salmon;">1</item> </div> <item style="grid-row: 1 / span 2; grid-column: 3; width: 30px; background: salmon;">2</item> <div class="track" style="grid-row: 2; grid-column: 2;"> <item style="width: 40px; height: 60px; background: green;">3</item> </div> <div class="track" style="grid-row: 3; grid-column: 1 / span 4;"> <item style="width: 80px; height: 60px; background: salmon;">4</item> <item style="width: 30px; height: 60px; background: green;">6</item> <div style="width: 20px;"></div> </div> <item style="grid-row: 1 / span 3; grid-column: 4; width: 20px; background: salmon;">5</item> </div> <div class="grid-end"> <item style="grid-row: 1 / span 2; grid-column: 1; width: 20px; background: salmon;">0</item> <div class="track" style="grid-row: 1; grid-column: 2;"> <item style="width: 80px; height: 60px; background: salmon;">1</item> </div> <item style="grid-row: 1 / span 2; grid-column: 3; width: 30px; background: salmon;">2</item> <div class="track" style="grid-row: 2; grid-column: 2; justify-content: flex-end;"> <item style="width: 40px; height: 60px; background: green;">3</item> </div> <item style="grid-row: 3; grid-column: 1 / span 2; justify-self: start; width: 80px; height: 60px; background: salmon;">4</item> <item style="grid-row: 3; grid-column: 3; width: 30px; height: 60px; background: green;">6</item> <item style="grid-row: 1 / span 3; grid-column: 5; width: 20px; background: salmon;">5</item> </div> </body> </html>