mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:27:35 +00:00
LibWeb: Support "order" property for items in GridFormattingContext
Closes https://github.com/SerenityOS/serenity/issues/20434
This commit is contained in:
parent
0a4b869233
commit
6354f950fd
3 changed files with 129 additions and 38 deletions
41
Tests/LibWeb/Layout/expected/grid/order.txt
Normal file
41
Tests/LibWeb/Layout/expected/grid/order.txt
Normal file
|
@ -0,0 +1,41 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (1,1) content-size 798x600 [BFC] children: not-inline
|
||||
BlockContainer <body> at (10,10) content-size 780x104 children: not-inline
|
||||
Box <div.grid-container> at (11,11) content-size 778x102 [GFC] children: not-inline
|
||||
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div.grid-item.item-1> at (271.328125,12) content-size 100x100 [BFC] children: inline
|
||||
line 0 width: 7.9375, height: 21.84375, bottom: 21.84375, baseline: 16.921875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [271.328125,12 7.9375x21.84375]
|
||||
"1"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div.grid-item.item-2> at (530.65625,12) content-size 100x100 [BFC] children: inline
|
||||
line 0 width: 11.015625, height: 21.84375, bottom: 21.84375, baseline: 16.921875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [530.65625,12 11.015625x21.84375]
|
||||
"2"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <div.grid-item.item-3> at (12,12) content-size 100x100 [BFC] children: inline
|
||||
line 0 width: 11.375, height: 21.84375, bottom: 21.84375, baseline: 16.921875
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [12,12 11.375x21.84375]
|
||||
"3"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> (not painted) [BFC] children: inline
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (10,114) content-size 780x0 children: inline
|
||||
TextNode <#text>
|
||||
|
||||
PaintableWithLines (Viewport<#document>) [0,0 800x600] overflow: [0,0 800x602]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x602]
|
||||
PaintableWithLines (BlockContainer<BODY>) [9,9 782x106]
|
||||
PaintableBox (Box<DIV>.grid-container) [10,10 780x104]
|
||||
PaintableWithLines (BlockContainer<DIV>.grid-item.item-1) [270.328125,11 102x102]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<DIV>.grid-item.item-2) [529.65625,11 102x102]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer<DIV>.grid-item.item-3) [11,11 102x102]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer(anonymous)) [10,114 780x0]
|
33
Tests/LibWeb/Layout/input/grid/order.html
Normal file
33
Tests/LibWeb/Layout/input/grid/order.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<style>
|
||||
* {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, auto);
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.item-1 {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.item-2 {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.item-3 {
|
||||
order: 1;
|
||||
}
|
||||
</style>
|
||||
<div class="grid-container">
|
||||
<div class="grid-item item-1">1</div>
|
||||
<div class="grid-item item-2">2</div>
|
||||
<div class="grid-item item-3">3</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue