Files
rust_browser/tests/goldens/fixtures/151-grid-explicit-col-auto-row.html
Zachary D. Rowitsch 755adb1940 Fix grid auto-placement for items with explicit column but auto row
When a grid item had an explicit grid-column (e.g. `grid-column: 2`)
but no grid-row, merge_placements incorrectly hardcoded row 0 and
marked the item as fully placed. This caused items to overlap the
first row instead of being placed in the next available row.

Fix: merge_placements now only returns a definite placement when both
column and row are explicitly specified. Phase 2 auto-placement is
enhanced to handle three cases: explicit column (scan rows), explicit
row (scan columns), and fully auto (existing behavior).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 22:19:39 -05:00

28 lines
439 B
HTML

<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
display: grid;
grid-template-columns: 50px 200px 50px;
}
.full-width {
grid-column: 1 / -1;
height: 40px;
background-color: #eee;
}
.middle {
grid-column: 2;
height: 30px;
background-color: #ccc;
}
</style>
</head>
<body>
<div class="full-width">Header</div>
<div class="middle">Content A</div>
<div class="middle">Content B</div>
</body>
</html>