1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:37:45 +00:00

LibWeb: Respect justify-items property of grid container

This commit is contained in:
Aliaksandr Kalenik 2023-07-14 20:57:36 +02:00 committed by Andreas Kling
parent f060f89220
commit 2138c164c9
4 changed files with 82 additions and 8 deletions

View file

@ -0,0 +1,27 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (1,1) content-size 798x82.40625 [BFC] children: not-inline
BlockContainer <body> at (10,10) content-size 780x64.40625 children: not-inline
BlockContainer <(anonymous)> at (10,10) content-size 780x0 children: inline
TextNode <#text>
Box <div.grid.start> at (11,11) content-size 778x19.46875 [GFC] children: not-inline
BlockContainer <div> at (12,12) content-size 43.859375x17.46875 [BFC] children: inline
line 0 width: 43.859375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 5, rect: [12,12 43.859375x17.46875]
"Start"
TextNode <#text>
BlockContainer <(anonymous)> at (10,31.46875) content-size 780x0 children: inline
TextNode <#text>
Box <div.grid.center> at (11,32.46875) content-size 778x19.46875 [GFC] children: not-inline
BlockContainer <div> at (373.476562,33.46875) content-size 53.046875x17.46875 [BFC] children: inline
line 0 width: 53.046875, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 6, rect: [373.476562,33.46875 53.046875x17.46875]
"Center"
TextNode <#text>
BlockContainer <(anonymous)> at (10,52.9375) content-size 780x0 children: inline
TextNode <#text>
Box <div.grid.end> at (11,53.9375) content-size 778x19.46875 [GFC] children: not-inline
BlockContainer <div> at (758.671875,54.9375) content-size 29.328125x17.46875 [BFC] children: inline
line 0 width: 29.328125, height: 17.46875, bottom: 17.46875, baseline: 13.53125
frag 0 from TextNode start: 0, length: 3, rect: [758.671875,54.9375 29.328125x17.46875]
"End"
TextNode <#text>

View file

@ -0,0 +1,11 @@
<!DOCTYPE html><style>
* { border: 1px solid black; }
.grid { display: grid; }
.start { justify-items: start; }
.center { justify-items: center; }
.end { justify-items: end; }
</style>
<body>
<div class="grid start"><div>Start</div></div>
<div class="grid center"><div>Center</div></div>
<div class="grid end"><div>End</div></div>