mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
LibWeb: Add support for implicit grid lines formed by grid areas in GFC
According to spec each grid area implicitly defines 4 additional named lines that could be used to specify items position.
This commit is contained in:
parent
92bf7d3ba7
commit
6480ed20b8
3 changed files with 92 additions and 2 deletions
34
Tests/LibWeb/Layout/input/grid/implicit-lines.html
Normal file
34
Tests/LibWeb/Layout/input/grid/implicit-lines.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html><html lang="en"><style>
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 100px 100px;
|
||||
gap: 10px;
|
||||
height: 220px;
|
||||
grid-template-areas:
|
||||
"one two"
|
||||
"one three";
|
||||
}
|
||||
|
||||
.item1 {
|
||||
background-color: lightblue;
|
||||
grid-row-start: one-start;
|
||||
grid-row-end: one-end;
|
||||
grid-column-start: one-start;
|
||||
grid-column-end: one-end;
|
||||
}
|
||||
|
||||
.item2 {
|
||||
background-color: lightcoral;
|
||||
grid-area: two;
|
||||
}
|
||||
|
||||
.item3 {
|
||||
background-color: lightgreen;
|
||||
grid-row-start: three-start;
|
||||
grid-row-end: three-end;
|
||||
grid-column-start: three-start;
|
||||
grid-column-end: three-end;
|
||||
}
|
||||
</style>
|
||||
<div class="grid-container"><div class="item2">Item 2</div><div class="item1">Item 1</div><div class="item3">Item 2</div></div>
|
Loading…
Add table
Add a link
Reference in a new issue