Status: FAIL | Duration: 19ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-grid/grid-lanes/alignment/row-grid-lanes-alignment-positioned-items-001.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS Grid Lanes Test: Self-Alignment along row axis of absolute positioned items</title> <link rel="author" title="Yanling Wang" href="mailto:yanlingwang@microsoft.com"> <link rel="help" href="https://drafts.csswg.org/css-grid-3/#abspos"> <link rel="help" href="https://drafts.csswg.org/css-grid-3/#alignment"> <link rel="match" href="row-grid-lanes-alignment-positioned-items-001-ref.html"> <style> html,body { color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0; } .grid-lanes { position: relative; display: grid-lanes; grid-template-rows: 100px 150px; width: 200px; height: 300px; background: grey; gap: 10px; padding: 10px; align-items: start; } .grid-lanes > div { position: absolute; } .grid-lanes > :nth-child(1) { grid-row: 1 / 2; justify-self: start; background: green; } .grid-lanes > :nth-child(2) { grid-row: 2 / 3; justify-self: start; background: blue; } .grid-lanes > :nth-child(3) { grid-row: 1 / 2; justify-self: end; background: yellow; } .grid-lanes > :nth-child(4) { grid-row: 2 / 3; justify-self: end; background: red; } </style> </head> <body> <div class="grid-lanes"> <div>X XX X</div> <div>XX X<br>X XXX X<br>XX XXX</div> <div>X XX X</div> <div>XX X<br>X XXX<br>X<br>XX XXX</div> </div> <div class="grid-lanes" style="direction: rtl;"> <div>X XX X</div> <div>XX X<br>X XXX X<br>XX XXX</div> <div>X XX X</div> <div>XX X<br>X XXX<br>X<br>XX XXX</div> </div> </body> </html>
/css/css-grid/grid-lanes/alignment/row-grid-lanes-alignment-positioned-items-001-ref.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> html,body { color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0; } .grid { position: relative; display: grid; grid-template-columns: 200px; grid-template-rows: 100px 150px; width: 200px; height: 300px; background: grey; gap: 10px; padding: 10px; } .grid > div { position: absolute; } .grid > :nth-child(1) { grid-row: 1/2; justify-self: start; background: green; } .grid > :nth-child(2) { grid-row: 2/3; justify-self: start; background: blue; } .grid > :nth-child(3) { grid-row: 1/2; justify-self: end; background: yellow; } .grid > :nth-child(4) { grid-row: 2/3; justify-self: end; background: red; } </style> </head> <body> <div class="grid"> <div>X XX X</div> <div>XX X<br>X XXX X<br>XX XXX</div> <div>X XX X</div> <div>XX X<br>X XXX<br>X<br>XX XXX</div> </div> <div class="grid" style="direction: rtl;"> <div>X XX X</div> <div>XX X<br>X XXX X<br>XX XXX</div> <div>X XX X</div> <div>XX X<br>X XXX<br>X<br>XX XXX</div> </div> </body> </html>