1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 12:05:07 +00:00
serenity/Tests/LibWeb/Layout/input/grid/line-placement-with-repeat.html
Aliaksandr Kalenik cfcc459140 LibWeb: Fix grid line name placement when repeat() is used
Before this change, parsed grid-template-columns/grid-template-rows
were represented as two lists: line names and track sizes. The problem
with this approach is that it erases the relationship between tracks
and their names, which results in unnecessarily complicated code that
restores this data (incorrectly if repeat() is involved) during layout.
This change solves that by representing line definitions as a list of
sizes and names in the order they were defined.

Visual progression https://genius.com/
2024-01-05 13:21:09 +01:00

14 lines
No EOL
355 B
HTML

<!DOCTYPE html><html><style type="text/css">
.container {
display: grid;
grid-template-columns: [grid-start] repeat(12, 40px) [grid-end];
background: pink;
}
.item {
grid-column: grid-start / grid-end;
}
.box {
width: 100%;
outline: 5px solid black;
}
</style><div class="container"><div class="item"><div class="box">1</div></div>