Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-grid/grid-lanes/alignment/row-justify-self-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Grid Lanes Test: justify-self on items adjacent to gaps in row direction</title>
<link rel="author" title="Celeste Pan" href="mailto:celestepan@microsoft.com">
<link rel="match" href="row-justify-self-002-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, 80px);
gap: 10px;
padding: 2px;
margin: 5px;
}
item {
display: block;
color: white;
}
</style>
</head>
<body>
<div class="grid-lanes">
<item style="width: 40px; background: #f4a0a0; justify-self: start;">1</item>
<item style="width: 80px; background: #f4a0a0;">2</item>
<item style="width: 200px; background: #2ca02c;">3</item>
<item style="width: 50px; background: #f4a0a0; grid-row: span 2; justify-self: start;">4</item>
<item style="width: 50px; background: #2ca02c; grid-row: span 3;">5</item>
</div>
<div class="grid-lanes">
<item style="width: 40px; background: #f4a0a0; justify-self: end;">1</item>
<item style="width: 80px; background: #f4a0a0;">2</item>
<item style="width: 200px; background: #2ca02c;">3</item>
<item style="width: 50px; background: #f4a0a0; grid-row: span 2; justify-self: end;">4</item>
<item style="width: 50px; background: #2ca02c; grid-row: span 3;">5</item>
</div>
</body>
</html>