Two grid placement bugs: 1. Items with explicit column but auto row (e.g. `grid-column: 2`) were hardcoded to row 0 by merge_placements, causing overlap with earlier rows. Now only fully-specified placements skip auto-placement, and Phase 2 respects explicit column/row constraints. 2. Negative grid line numbers were off-by-one. CSS Grid has N+1 lines for N tracks, so line -1 should resolve to index N (after the last track), not N-1. This caused `grid-column: 1 / -1` to span N-1 columns instead of all N, producing asymmetric gutters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
397 B
HTML
27 lines
397 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
display: grid;
|
|
grid-template-columns: 50px 200px 50px;
|
|
}
|
|
.full {
|
|
grid-column: 1 / -1;
|
|
height: 30px;
|
|
background-color: #eee;
|
|
}
|
|
.last-two {
|
|
grid-column: 2 / -1;
|
|
height: 25px;
|
|
background-color: #ccc;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="full">Full</div>
|
|
<div class="last-two">Last two</div>
|
|
</body>
|
|
</html>
|